Agent / foldkit-agent-mcp

How the contract maps to MCP

MCP method or notificationfoldkit-agent source
tools/listCapabilities currently available in the Model
tools/callAgentRuntime dispatch by protocol name
resources/list / resources/readNamed resources, app://context, and app://parts
notifications/tools/list_changedEmitted when the advertised tool set changes
notifications/cancelledAborts the matching in-flight invocation

When bound with Parts, app://parts serves runtime.parts.list as JSON—one entry per part (and per occurrence of repeated parts) with id, occurrence, label, role, capability, and value (omitting absent fields so null stays distinct). Parts add no extra tools beyond the capabilities they invoke; a resource explicitly named parts or context takes precedence over the built-in URI.

Input schemas derive directly from each capability's Effect Schema. Capabilities with a completion contract resolve after their correlated success or failure Message arrives; others resolve after validated dispatch.