resolveSource(config)
Dispatches to the correct adapter based onconfig.type and returns a Source object:
Source interface
Adapters
OpenAPIAdapter
Fetches an OpenAPI/Swagger spec and generates tools from each endpoint.- Tool paths:
namespace.resource.action(e.g.,billing.invoices.list) - Action mapping: GET ->
list/get, POST ->create, PUT ->update, PATCH ->patch, DELETE ->delete - Destructiveness: Derived from HTTP method (GET, HEAD, OPTIONS are safe)
GraphQLAdapter
Introspects a GraphQL schema and generates tools from queries and mutations.- Tool paths:
namespace.field_name(camelCase -> snake_case) - Destructiveness: Queries are safe, mutations are destructive
- Schema inference: Extracts input types from field arguments
MCPAdapter
Connects to an external MCP server and imports its tools.- Tool paths:
namespace.tool_name(normalized to lowercase with underscores) - Discovery: Calls MCP
tools/listvia JSON-RPC - Invocation: Calls MCP
tools/callwith tool name and arguments - Destructiveness: Reads
annotations.destructiveHintfrom MCP metadata
PluginAdapter
Wraps adefinePlugin() result as a source for registry consistency.
- Tool paths: As defined in the plugin
- Destructiveness: Uses the explicit
destructivefield on each tool