Skip to contents

Returns 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.

Usage

mcp_build_ellmer_tools(mcp_state, timeout_ms = 15000L, visited_env = NULL)

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 $nodes character vector. When supplied, the get_node_info, find_callers, and find_callees callbacks append each queried node name so that the caller can reconstruct the retrieval set after chat$chat() returns and compute NDCG@5/10 (bench#74).

Value

A named list of four ellmer tool definitions.