melch

One tool contract across two runtime dialects

You define a tool once with its name, description, schema, and execute function. The framework derives what the model receives and what an MCP client inspects from that single object, keeping YAML declarations aligned with the running code.

tools:
  - "web_search"
  - "web_extract"
  - "preload_memory"

A subagent declares tools by name in its tools list. The runtime skips unrecognized names with an explanatory warning and continues execution. You can also supply an mcp_server_url to discover and mount tools from an external server at runtime.

One contract derives both tool interfaces

You declare the contract once with defineTool. From it, toFunctionTool derives the model tool through toGeminiSchema and toMcpToolDefinition derives the MCP inputSchema through toStandardJsonSchema; both dialects cannot drift, and validation failures return to the model as text.

One contract at the centre derives the model’s function tool and the MCP tool definition on either side. Tool contract defineTool({ name, description, schema, execute }) schema: one zod type, the one source of the shape execute(input) → Promise<string> Model function tool toFunctionTool(contract) FunctionTool: name, description, parameters via toGeminiSchema() MCP tool definition toMcpToolDefinition(contract) MCP tool: name, description, inputSchema via toStandardJsonSchema()

The web and X

These tools run web search and page reading through provider-native search capabilities where supported, falling back to client-side extraction for local models.

Images

The generator creates images from structured payloads, while the inspector conducts blind visual inventories without access to the generation specification.

Memory

Long-term memory stores user-siloed facts in Supabase pgvector, tracking dates, sources, active or superseded statuses, and named entities.

The knowledge bundle

These tools expose a repository manual as a queryable knowledge bundle with a typed entity graph, which the framework runs on its own codebase.