Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Commit c3a0dfd

Browse files
authored
export loadMcpTools (#29)
1 parent 304c184 commit c3a0dfd

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ try {
118118
await client.connect(transport);
119119

120120
// Get tools
121-
const tools = await loadMcpTools(client);
121+
const tools = await loadMcpTools("math", client);
122122

123123
// Create and run the agent
124124
const agent = createReactAgent({ llm: model, tools });

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ export {
44
type StdioConnection,
55
type SSEConnection,
66
} from './client.js';
7+
8+
export { loadMcpTools } from './tools.js';

src/tools.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ async function _callTool(
166166
/**
167167
* Load all tools from an MCP client.
168168
*
169+
* @param serverName - The name of the server to load tools from
169170
* @param client - The MCP client
170171
* @returns A list of LangChain tools
171172
*/

0 commit comments

Comments
 (0)