mcp-use
Version:
Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
23 lines • 1.25 kB
TypeScript
import type { StructuredToolInterface } from "@langchain/core/tools";
import type { Tool as MCPTool, Resource, Prompt } from "@modelcontextprotocol/sdk/types.js";
import type { BaseConnector } from "../connectors/base.js";
import { BaseAdapter } from "./base.js";
export declare class LangChainAdapter extends BaseAdapter<StructuredToolInterface> {
constructor(disallowedTools?: string[]);
/**
* Convert a single MCP tool specification into a LangChainJS structured tool.
*/
protected convertTool(mcpTool: MCPTool, connector: BaseConnector): StructuredToolInterface | null;
/**
* Convert a single MCP resource into a LangChainJS structured tool.
* Each resource becomes an async tool that returns its content when called.
*/
protected convertResource(mcpResource: Resource, connector: BaseConnector): StructuredToolInterface | null;
/**
* Convert a single MCP prompt into a LangChainJS structured tool.
* The resulting tool executes getPrompt on the connector with the prompt's name
* and the user-provided arguments (if any).
*/
protected convertPrompt(mcpPrompt: Prompt, connector: BaseConnector): StructuredToolInterface | null;
}
//# sourceMappingURL=langchain_adapter.d.ts.map