UNPKG

agentfootprint

Version:

The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.

25 lines • 1.15 kB
"use strict"; /** * MCP — Model Context Protocol, in both directions. * * MCP (https://modelcontextprotocol.io) is an open standard for * connecting LLMs to external tools and data sources. This module * bridges it both ways: * * - `mcpClient(opts)` — consume an MCP server; its tools become * agentfootprint `Tool[]` you can hand to `agent.tools(...)`. * - `mcpServe(tools, opts)` — the other direction: expose your own * `Tool[]` AS an MCP server, so any MCP client can call them. * * Pattern: Adapter (GoF) — translates MCP wire format ↔ agentfootprint * `Tool` interface. The MCP SDK does the protocol work; we * just bridge. * Role: Layer-3 tool integration. Pairs with `defineTool` (the * inline alternative for non-MCP tools). * Emits: N/A directly — wrapped tools emit the standard * `agentfootprint.stream.tool_start` / `tool_end` events * when the agent calls them. `mcpServe` runs OUTSIDE any * agent run, so it emits nothing at all. */ Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=types.js.map