Build ellmer tool definitions that wrap MCP server calls.
Source:R/mcp_helpers.R
mcp_build_ellmer_tools.RdReturns a list of four ellmer tool() objects (search_nodes,
get_node_info, find_callers, find_callees) whose callbacks proxy the
corresponding MCP tools via the running stdio server in mcp_state.
Register these with chat$register_tool() before calling
chat$chat(task_description) to give the LLM control over graph
traversal — the RLM-Graph execution model.
Arguments
- mcp_state
State environment returned by
mcp_start_server().- timeout_ms
Per-call timeout in milliseconds (default 15 000).
- visited_env
Optional environment with a
$nodescharacter vector. When supplied, theget_node_info,find_callers, andfind_calleescallbacks append each queried node name so that the caller can reconstruct the retrieval set afterchat$chat()returns and compute NDCG@5/10 (bench#74).