Execute MCP query (read-only)
Execute a read-only query via an MCP connector.
This follows the MCP Resource pattern for data retrieval. For write operations, use /mcp/tools/execute.
Audit Logging
All MCP queries are automatically logged to the mcp_query_audits table with:
- Request phase: SQLi detection results, PII blocking decisions
- Response phase: PII redaction details, redacted field paths
- Exfiltration checks: Row counts, volume limit violations
- Result: Success/failure, error messages, duration
Each audit entry includes audit_id for correlation with SDK PolicyInfo. Statement content is stored as SHA256 hash for privacy.
Request
- Base URLhttps://agent.getaxonflow.com
- Authnone declared. Required headers: Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
The approval a retry spends (#4370). A call held for a person's approval is answered a pending_approval naming an id; once a person approves it in the portal, the caller retries the SAME call naming that id here (or in the body's approval_id field, for a client that cannot set headers - a header and a field naming different ids are refused approval_not_found).
The retry is decided exactly as the first call was. Only when it is again held for approval, and the approval is approved by a person who is not the caller, before its expiry, unspent, and granted for this very call (the same input, tool, route, requester and requirement), does it pass - and the approval is spent: it admits exactly one call. A call that is allowed anyway spends nothing; no approval lifts a deny. Every other outcome is refused with one of the ApprovalHoldReason codes. Enterprise; the Community build has no approval queue and ignores the header.
WHAT "THE SAME CALL" MEANS. On the MCP routes: the connector, the tool, the operation, the statement and its parameters (and the row limit on /mcp/resources/query). On /api/v1/decide: the WHOLE request the engine decided - stage, target, query AND context. A retry that changes any of it is refused bound_input_changed: resend the same context, and carry per-request values (request ids, timestamps) in headers, never in context - the correlation id is a header.
OAuth2-style Basic authentication header. Format: Basic base64(clientId:clientSecret)
- clientId: Your organization identifier (required)
- clientSecret: Authentication credential (optional for community mode)
Not required when DEPLOYMENT_MODE=community.
Request body
Response
Query executed successfully
Changes
No recorded changes to this operation across all 1 revision of this API.