File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
packages/use-agently/src/commands Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,17 @@ function checkSpendLimit(err: DryRunPaymentRequired, maxSpendPerCall: number): v
3939}
4040
4141export const toolsCommand = new Command ( "tools" )
42- . description ( "List available tools on an MCP server" )
43- . requiredOption ( "-u, --uri <value>" , "MCP server URL or CAIP-19 ID" )
44- . showHelpAfterError ( true )
42+ . description ( "List or call tools on an MCP server" )
43+ . option ( "-u, --uri <value>" , "MCP server URL or CAIP-19 ID" )
4544 . addHelpText (
4645 "after" ,
47- "\nExamples:\n use-agently tools --uri https://example.com/mcp\n use-agently tools --uri eip155:8453/erc8004:0x1234/1" ,
46+ "\nExamples:\n use-agently tools --uri https://example.com/mcp\n use-agently tools --uri eip155:8453/erc8004:0x1234/1\n use-agently tools call --uri https://example.com/mcp --tool echo " ,
4847 )
49- . action ( async ( options : { uri : string } , command : Command ) => {
48+ . action ( async ( options : { uri ?: string } , command : Command ) => {
49+ if ( ! options . uri ) {
50+ command . outputHelp ( ) ;
51+ return ;
52+ }
5053 const tools = await listMcpTools ( defaultClient , options . uri , {
5154 clientInfo : { name : "use-agently" , version : pkg . version } ,
5255 fetchImpl : clientFetch ,
You can’t perform that action at this time.
0 commit comments