Use the oracle_analytics-execute_logical_sql MCP Server Tool (Preview)

The oracle_analytics-execute_logical_sql tool allows you to programmatically execute Oracle Logical SQL queries against Oracle Analytics Cloud with streaming results.

Input Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Logical SQL query string"
    },
    "maxRows": {
      "type": "integer",
      "description": "Maximum rows to return"
    }
  },
  "required": ["query"]
}

Parameters

Name Type Required or Optional Default Value Description
query String Required - Oracle Logical SQL query.
maxRows Integer Optional 1000 Maximum rows to stream.

JSON-RPC Request

{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "tools/call",
  "params": {
    "name": "oracle_analytics-execute_logical_sql",
    "arguments": {
      "query": "SELECT \"Sales History Subject Area\".\"PRODUCTS\".\"PROD_NAME\" AS llm_0, \"Sales History Subject Area\".\"SALES\".\"AMOUNT_SOLD\" AS llm_1 FROM \"Sales History Subject Area\" ORDER BY llm_1 DESC FETCH FIRST 10 ROWS ONLY",
      "maxRows": 10
    }
  }
}

Response Structure

{
  "metadata": {
    "requestId": "c0a9c7aa-3e22-45b7-8332-15829fd28e68",
    "batchSize": 1000,
    "startTime": 1768212549995
  },
  "batches": [
    {
      "batchNumber": 1,
      "cursorId": "95983e90-bad8-4158-8dac-31206c1ccee7",
      "data": [
        {"llm_0": "Envoy Ambassador", "llm_1": 15011642.52},
        {"llm_0": "Mini DV Camcorder", "llm_1": 8314815.4}
      ],
      "recordsInBatch": 2,
      "totalRecordsStreamed": 2,
      "hasMore": false,
      "isComplete": true
    }
  ],
  "status": {
    "result": "success",
    "error": false,
    "message": "Streaming completed successfully"
  },
  "summary": {
    "completed": true,
    "totalBatches": 1,
    "totalRecords": 2,
    "durationMs": 5
  }
}

Response Fields

Metadata Object

Name Type Description
requestId String Unique request identifier (UUID).
batchSize Integer Records per batch.
startTime Integer Unix timestamp (milliseconds).

Batch Object

Name Type Description
batchNumber Integer Sequential batch number.
data Array Array of result objects.
recordsInBatch Integer Records in current batch.
hasMore Boolean More data available.
isComplete Boolean Batch completion status.