Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
feat(mcp): state the structural questions in the scout and analysis profiles
Martin Vogel5e345e32c01d
diff --git a/src/mcp/mcp.c b/src/mcp/mcp.cindex 3d1a864c0..f6e43b317 100644--- a/src/mcp/mcp.c+++ b/src/mcp/mcp.c@@ -1473,14 +1473,22 @@ static const char MCP_SERVER_INSTRUCTIONS[] ="Results are paginated.";static const char MCP_ANALYSIS_SERVER_INSTRUCTIONS[] =- "analysis tool profile: read-only graph work via search_graph, trace_path, "- "get_code_snippet, query_graph, get_architecture, or search_code. Use check_index_coverage "- "for cited paths; paginate.";+ "analysis tool profile (read-only): a code knowledge graph of the indexed repository for "+ "structural questions: where a symbol is defined, who calls a function, what it calls, call "+ "chains and data flow, which code a change affects, how modules fit together. search_graph "+ "finds symbols; trace_path follows callers, callees and data flow; get_code_snippet returns "+ "exact source; query_graph runs multi-hop Cypher; get_architecture summarizes structure; "+ "search_code combines text search with graph context; detect_changes maps the current diff "+ "to affected symbols. check_index_coverage tells whether a cited file was fully indexed. "+ "Results are paginated.";static const char MCP_SCOUT_SERVER_INSTRUCTIONS[] =- "scout tool profile: fast positive discovery via search_graph, trace_path, "- "get_code_snippet, or get_architecture with narrow limits. Use check_index_coverage for "- "cited paths. Findings are provisional.";+ "scout tool profile (fast, provisional): quick structural lookups in the indexed "+ "repository: where a symbol is defined, who calls a function, what it calls. search_graph "+ "finds symbols; trace_path follows callers and callees; get_code_snippet returns exact "+ "source; get_architecture summarizes structure; narrow limits keep answers fast. "+ "check_index_coverage tells whether a cited file was fully indexed. Findings are "+ "provisional.";static char *cbm_mcp_initialize_response_for_profile(const char *params_json,cbm_mcp_tool_profile_t profile) {diff --git a/tests/test_mcp.c b/tests/test_mcp.cindex ade684372..1ced07c95 100644--- a/tests/test_mcp.c+++ b/tests/test_mcp.c@@ -2195,6 +2195,9 @@ TEST(server_handle_analysis_profile_filters_and_rejects_mutators) {ASSERT_NOT_NULL(strstr(resp, "analysis tool profile"));ASSERT_NOT_NULL(strstr(resp, "check_index_coverage"));ASSERT_NULL(strstr(resp, "index_repository"));+ /* Profile instructions name the structural questions, like the default. */+ ASSERT_NOT_NULL(strstr(resp, "who calls a function"));+ ASSERT_NOT_NULL(strstr(resp, "which code a change affects"));free(resp);resp = cbm_mcp_server_handle(srv, "{\"jsonrpc\":\"2.0\",\"id\":220,\"method\":\"tools/list\"}");@@ -2237,6 +2240,7 @@ TEST(server_handle_scout_profile_exposes_only_the_fast_tier) {ASSERT_NOT_NULL(strstr(resp, "scout tool profile"));ASSERT_NOT_NULL(strstr(resp, "check_index_coverage"));ASSERT_NULL(strstr(resp, "index_repository"));+ ASSERT_NOT_NULL(strstr(resp, "who calls a function"));ASSERT_FALSE(mcp_saw_autoindex_log);free(resp);