Meta MCP: Chaining Tools via Prompt-Driven Arguments

https://news.ycombinator.com/rss Hits: 1
Summary

Three MCP tools are called in a single MCP request. The arguments for tools 2 and 3 are 'PROMPT_ARGUMENT' and are inferred based on the result of tool 1. Your browser does not support the video tag. IntroI’ve been experimenting with Model Context Protocol and learning more by building yet another MCP server. In my case, it’s an LLM interface for interacting with Apache Kafka: kafka-mcp-server.One thing I noticed, though, is that I often need to call 2 or 3 tools to perform a simple action, where the result of tool 3 depends on the output of tools 1 or 2. Over time, this became quite tedious.Then I thought—why not multiplex or bundle multiple tool calls together, with arguments as PROMPT_ARGUMENTs that get resolved after the previous tools have run? For example:List the topics present in the cluster.Read messages from the topic related to transactions.Create a duplicate of that topic named ${originalName}-dup.Workflows like this—or any others where results can be easily extracted but require too much back-and-forth—become much simpler with this new multiplexing tool.And this multiplexing tool is really just a simple utility that takes an array of tool call requests:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 { "description": "Takes a list of tool requests and executes each one, returning a list of their results. Use this tool when you need to call multiple tools in sequence. If an argument for a tool at position N depends on the result of a previous tool [1...N-1], you can express that argument as a prompt to the LLM using the format `PROMPT_ARGUMENT: your prompt here`. For example: `PROMPT_ARGUMENT: the ID of the created resource.`", "inputSchema": { "type": "object", "properties": { "tools": { "description": "List of tool requests", "items": { "properties": { "id": { "description": "the request ID.", "required": true, "type": "number" }, "jsonrpc": { "description": "...

First seen: 2025-04-21 16:36

Last seen: 2025-04-21 16:36