Reference
MCP
Model Context Protocol transport, metadata, token model, tools/list, tools/call, resource projection, prompt projection, errors, and observability.
OverviewMCP overviewProduct-level explanation of the MCP projection and client workflow.BindingsExposure bindingsThe shared projection model that binds MCP, REST, GraphQL, gRPC, SDKs, CLI, dashboards, and Runtime Fabric scaling vocabulary.AuthAuthentication referenceBearer tokens, API keys, scopes, project grants, policy evaluation, sessions, and authorization envelopes.RESTREST controller atlasEvery controller-backed endpoint with parameters, request examples, responses, errors, and samples.SDKSDK method referenceEvery client method across TypeScript, Python, C#, Go, and Rust with inputs, returns, and errors.CLICLI command referenceEvery command group, subcommand, flag, sample output, and exit code for automation and CI.
Vadyl's MCP endpoint is a canonical projection of the same operation dispatcher used by REST, SDKs, CLI, and dashboard actions. There is no separate AI-only authority path.
Endpoints
POST /mcp/{tenantSlug}/{projectSlug}
GET /mcp/{tenantSlug}/{projectSlug}/.well-known/oauth-protected-resourceSupported JSON-RPC methods
| Method | Vadyl projection | Output |
|---|---|---|
initialize | Protocol negotiation, server capabilities, instructions, tracing policy. | ServerInfo + capabilities. |
tools/list | Allowed entity operations, custom operations, workflows, agents, automation actions, analytics queries, connections, storage, source assets, and explainers. | Grant-filtered McpTool[]. |
tools/call | Dispatch through IApiOperationDispatcher and the same exposure binding as REST/SDK/CLI. | Typed content blocks or canonical error. |
resources/list | Schema, PCG nodes, source files, knowledge corpora, memory namespaces, analytics catalogs, run traces, and published surface manifests. | Grant-filtered resource descriptors. |
resources/read | Read one resource with field security, redaction, publication pinning, and audit. | Text, JSON, or binary reference content. |
prompts/list | Prompt templates derived from project state, agents, installed surfaces, and governed workflows. | Prompt descriptors with argument schemas. |
prompts/get | Resolve one prompt template with typed arguments and caller grants. | Prompt messages and metadata. |
completion/complete | Schema-aware completions for entity names, fields, operations, workflow signals, measure ids, and resource URIs. | Bounded completion list. |
ping | Liveness probe tied to the project runtime descriptor. | { "status": "ok" }. |
Protected resource metadata
GET /mcp/acme/billing/.well-known/oauth-protected-resource
HTTP/1.1 200 OK
{
"resource": "https://api.vadyl.app/mcp/acme/billing",
"authorization_servers": ["https://api.vadyl.app/oauth"],
"scopes_supported": [
"vadyl:project:read",
"vadyl:operation:invoke",
"vadyl:agent:run"
],
"bearer_methods_supported": ["header"]
}List tools
{
"jsonrpc": "2.0",
"id": "1",
"method": "tools/list",
"params": {}
}Call a tool
{
"jsonrpc": "2.0",
"id": "2",
"method": "tools/call",
"params": {
"name": "Order.list",
"arguments": {
"filter": { "status": { "eq": "paid" } },
"pageSize": 5
}
}
}
{
"jsonrpc": "2.0",
"id": "2",
"result": {
"content": [{
"type": "json",
"json": {
"data": [{ "id": "ord_123", "status": "paid" }],
"page": { "size": 5, "next": "cur_1" }
}
}]
}
}Initialize
{
"jsonrpc": "2.0",
"id": "init-1",
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"clientInfo": { "name": "acme-agent", "version": "1.3.0" },
"capabilities": {
"tools": {},
"resources": {},
"prompts": {},
"completion": {}
}
}
}Tool families
| Family | Examples | Authority |
|---|---|---|
| Entities | Order.list, Customer.read, Invoice.update, Product.batchCreate | Entities + ExposureBindings. |
| Operations | Order.refund, Cart.reprice, Subscription.pause | OperationProjectionSurface. |
| Workflows | Fulfillment.start, Fulfillment.signal, Fulfillment.query, Fulfillment.cancel | WorkflowSurface. |
| Agents | SupportAgent.run, SupportAgent.stream, SupportAgent.memory.recall | AgentSkillSurface. |
| Connections | stripe.createCharge, twilio.sendSms, slack.postMessage | GovernedConnectionAdapter. |
| Analytics | analytics.query.execute, measure.query, lineage.explain | AnalyticsSurface + PCG measures. |
| Automation | automation.run.start, automation.approval.approve, automation.run.signal | AutomationActionSurface. |
| Platform | explain.access, surface.describe, pcg.node, observability.trace | Cross-cutting explainability and observability descriptors. |
Resources
{
"jsonrpc": "2.0",
"id": "res-1",
"method": "resources/list",
"params": { "cursor": null }
}Read resource
{
"jsonrpc": "2.0",
"id": "res-2",
"method": "resources/read",
"params": { "uri": "vadyl://schema/entities/Order" }
}
{
"jsonrpc": "2.0",
"id": "res-2",
"result": {
"contents": [{
"uri": "vadyl://schema/entities/Order",
"mimeType": "application/json",
"text": "{\"name\":\"Order\",\"fields\":[\"id\",\"status\",\"total\"],\"operations\":[\"list\",\"read\",\"create\",\"update\",\"refund\"]}"
}]
}
}Prompts
{
"jsonrpc": "2.0",
"id": "prompt-1",
"method": "prompts/list",
"params": {}
}
{
"jsonrpc": "2.0",
"id": "prompt-1",
"result": {
"prompts": [{
"name": "debug-slow-operation",
"description": "Inspect query plan, cache decision, provider health, and recent traces for one operation.",
"arguments": [
{ "name": "operation", "required": true },
{ "name": "since", "required": false }
]
}]
}
}Completion
{
"jsonrpc": "2.0",
"id": "complete-1",
"method": "completion/complete",
"params": {
"ref": { "type": "ref/resource", "uri": "vadyl://schema/entities/" },
"argument": { "name": "entity", "value": "Or" }
}
}
{
"jsonrpc": "2.0",
"id": "complete-1",
"result": {
"completion": {
"values": ["Order", "OrderLine", "OrderRefund"],
"total": 3,
"hasMore": false
}
}
}Projection rules
- Every project-visible canonical operation can become an MCP tool when the exposure grants allow it.
- Tool input schemas derive from the same request contracts as REST/OpenAPI/SDK/CLI.
- Tool output schemas derive from canonical response contracts and preserve error envelopes.
- Agent runs, memory recall, knowledge corpus retrieval, and operation dispatch are all audited and metered.
- Denied tools are absent from
tools/listfor that token. - Resource reads are publication-pinned, field-security aware, and redacted under the same access masks as REST reads.
- Prompt templates are generated from project descriptors, installed surfaces, and agent definitions; they do not grant extra authority.
Auth, scopes, and headers
| Contract | Meaning |
|---|---|
Authorization: Bearer | Required except anonymous public resource metadata. Tokens can be user, service-profile, API key exchange, or short-lived MCP token. |
X-Vadyl-Project | Optional when encoded in the MCP route; required for host-scoped tooling. |
vadyl:project:read | List/read resources and non-mutating tools. |
vadyl:operation:invoke | Invoke canonical operation tools. |
vadyl:agent:run | Start or stream agent runs. |
vadyl:surface:install | Install or upgrade publishable surfaces through MCP tools when granted. |
Rate limits and quotas
tools/list,resources/list, andprompts/listuse descriptor-cache quotas and return stable cursors.tools/callconsumes the same operation quota, token budget, connector quota, workflow quota, and billing meter as the underlying surface.- Agent tools run token-accounting preflight before model calls and reconcile final spend after completion.
- Long-running tools return an accepted run resource when the operation cannot complete inside the synchronous window.
- Retries must reuse the same JSON-RPC id plus the underlying idempotency key when the tool declares one.
Observability
{
"vadyl": {
"correlationId": "01HXZ0J4YV8AJF2GFG2T1F7Y42",
"publicationVersion": 412,
"bindingId": "mcp:tool:Order.list",
"descriptorHash": "sha256:8b7a...",
"reasonCodeBlock": "Mcp.ToolDispatch",
"usage": {
"meter": "operation.invoke",
"tokensEstimated": 0,
"providerCalls": 1
}
}
}Error response
{
"jsonrpc": "2.0",
"id": "2",
"error": {
"code": -32003,
"message": "Access denied",
"data": {
"vadylCode": "ACCESS_DENIED",
"reasonCode": "Mcp.ToolGrant.Missing",
"correlationId": "01HXZ0J4YV8AJF2GFG2T1F7Y42"
}
}
}