{"at":"2026-11-23T01:55:40.173Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T01:55:41.174Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"code-graph","version":""}},"cacheScope":"private","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"Use cg before grep or opening files for questions about where code is, what calls what, or what a change affects. `search` finds a symbol; before editing, `impact` (callers up to entry points) or `reaches` (every dependent) shows what the change affects; `snippet` reads one symbol instead of a whole file; `explore` answers a broad 'how does X work' in one call. Unsure which graph? Call `graphs`. Fall back to normal search only for what cg reports as not covered (`coverage`, a `coverage note:` line). Spec forms and stack notes: resource cg://guide.","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T01:55:41.174Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T01:55:41.176Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"code-graph","version":""}},"cacheScope":"private","resultType":"complete","tools":[{"description":"Use before changing a column, table, connection, env key or symbol: everything that depends on it.\nReverse transitive dependents of one or more targets (union), e.g.\n[\"orders.customer_id\", \"connection:warehouse\", \"connection:tenant_*\"].\n\nGroups: RUNTIME (live; reached from http routes/schedules/jobs/listeners, or main()/exported FFI symbols in\nRust/C/C++), LIBRARY (only via a library's public API), DEV (only tests/benches/examples/build scripts), OPERATOR (artisan commands /\nadmin panels only: one-off import & provisioning), GATED (dead under the indexed gate scenario, e.g.\ncode that only runs while a feature flag is off), NO-ENTRY. Inside each group items are grouped by\n`group_by` = module | entry_kind | class. Each line: symbol, entry kinds, depth, shortest evidence path\n(hops KIND@file:line; ~r = resolved, ~h = heuristic confidence). At most `max_per_group` lines per top-level\ngroup (shallowest first). min_confidence: heuristic | resolved | exact.\nA hop on a database connection other than the default shows `conn=<name>` (dynamic names as a pattern, `?` when it\ncannot be resolved). connection: only the table / column edges that go to that connection (a dynamic name by its\npattern, e.g. `legacy_{store.id}`); no match lists the connections seen.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"connection":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Connection"},"group_by":{"default":"module","title":"Group By","type":"string"},"include_gated":{"default":true,"title":"Include Gated","type":"boolean"},"max_per_group":{"default":25,"title":"Max Per Group","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"paths":{"default":true,"title":"Paths","type":"boolean"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"},"targets":{"items":{"type":"string"},"title":"Targets","type":"array"}},"required":["targets"],"title":"reachesArguments","type":"object"},"name":"reaches","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use before editing a function: what a change to it affects. Reverse callers of a method (Class::method, short or FQN) up to entry points, with the shortest call path\nfrom each entry point.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"max_items":{"default":60,"title":"Max Items","type":"integer"},"method":{"title":"Method","type":"string"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"paths":{"default":true,"title":"Paths","type":"boolean"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"}},"required":["method"],"title":"impactArguments","type":"object"},"name":"impact","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use to see who calls X right now. Direct callers of a function / method / class (one level: CALLS, INSTANTIATES, dispatch and framework edges\ninto it), each with the call site file:line and confidence. For the full chain up to entry points use impact().","inputSchema":{"properties":{"limit":{"default":60,"title":"Limit","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"symbol":{"title":"Symbol","type":"string"}},"required":["symbol"],"title":"callersArguments","type":"object"},"name":"callers","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Code parallel to a symbol that often needs the same change: classes sharing its parent/interface/trait,\nthe same method in sibling classes, other code touching the same tables/columns/config/connections, and\nco-callers (methods calling the same helpers; Jaccard on callees).","inputSchema":{"properties":{"limit":{"default":15,"title":"Limit","type":"integer"},"symbol":{"title":"Symbol","type":"string"}},"required":["symbol"],"title":"siblingsArguments","type":"object"},"name":"siblings","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Every place a concept (e.g. 'timezone', 'locale') is resolved, deterministically: assignment/return sites\nwhose value is a `??`/`?:` chain or an ordered sequence of early returns, expanded into a fallback chain of\nrequest input keys (FormRequest rules / $request->input / $filters['x'] through helper calls), settings\n(getSetting(key, default)), model columns, config/env and literal defaults. Sites are grouped into lettered\nchains by signature; the divergence section shows pairwise where chains first differ; each chain lists the\nroutes that reach it. On a combined graph, also the frontend side: whether each matched client call sends the\nkey (builder keys + call-site argument keys) and client literal fallbacks (`x ?? 'UTC'`).\n`within` filters owning functions by substring (e.g. 'Report'); `detail=True` lists every client call site and\nthe keys it passes (default: one line per client request with its verdict).","inputSchema":{"properties":{"client":{"default":true,"title":"Client","type":"boolean"},"concept":{"title":"Concept","type":"string"},"detail":{"default":false,"title":"Detail","type":"boolean"},"max_chars":{"default":40000,"title":"Max Chars","type":"integer"},"within":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Within"}},"required":["concept"],"title":"resolutionsArguments","type":"object"},"name":"resolutions","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Heuristic (#88): does a stored property `Type.prop` round-trip through a lossy transform? Each write site with\nthe lossy call it passes through (clamp, min/max, round, truncating casts, `fit*`, `.cg.yaml` `lossy:` names,\n`@cg-lossy` functions; within the function plus one hop through direct callers), each read site that seeds UI\nstate (init, onAppear, remember, useState(initial), mounted), and un-narrowed ranges drawn next to such a read.\nFindings are heuristic evidence with file:line, not proof. An empty `prop` (or `*`) checks every stored property\nin one pass and lists only the round trips.","inputSchema":{"properties":{"include_tests":{"default":false,"title":"Include Tests","type":"boolean"},"prop":{"default":"","title":"Prop","type":"string"}},"title":"roundtripArguments","type":"object"},"name":"roundtrip","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Heuristic (#88 phase 3); `rules` is a comma-separated subset (default all). stale-async-result: a write of\nstored / UI state inside Task / launch / useEffect / async function / async def code after an await, using the\nawaited result of an input-dependent request, with no cancellation check and no comparison against a token / ID /\ngeneration captured before the await. two-writers: state written with real (computed) values by lifecycle code\n(init, onAppear, useEffect, LaunchedEffect) and by async code after an await or a completion callback.\nincomplete-cache-key: a cache / memo store whose key leaves out a parameter or instance field the cached value\nuses. echo-suppression: state that is written with a guard flag set (`isApplyingRemote`, `lastSent…`) so its\nobserver returns early, but is also written from async code without the guard. file:line evidence; not proof.","inputSchema":{"properties":{"include_tests":{"default":false,"title":"Include Tests","type":"boolean"},"limit":{"default":80,"title":"Limit","type":"integer"},"rules":{"default":"","title":"Rules","type":"string"}},"title":"lint_async_stateArguments","type":"object"},"name":"lint_async_state","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Who reads a DB table, a column or a stored property. `prop` is `table`, `table:X`, `table.column` / `column:table.column`\n(READS_TABLE / READS_COLUMN edges, grouped by column; heuristic string-literal MENTIONS_COLUMN matches come last and are\nlabelled) or `Type.prop` / `Class::$prop` (READS_PROP edges: Swift, Kotlin, Python, TypeScript, PHP). Each site with the\nentry-point kinds that reach it; test code's property reads come last. An unknown spec lists what was tried, the table's\ncolumns and close matches. A site on a database connection other than the default shows `conn=<name>`; `connection`\nkeeps only the sites on that connection (no match lists the connections seen).","inputSchema":{"properties":{"connection":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Connection"},"limit":{"default":60,"title":"Limit","type":"integer"},"prop":{"title":"Prop","type":"string"}},"required":["prop"],"title":"readersArguments","type":"object"},"name":"readers","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Who writes a DB table, a column or a stored property. `table` is `table`, `table:X`, `table.column` / `column:table.column`\n(WRITES_TABLE / WRITES_COLUMN edges; for a column, the writers of that column, then a separate \"table-level writes (columns\nnot recorded)\" group) or `Type.prop` / `Class::$prop` (WRITES_PROP edges: Swift, Kotlin, Python, TypeScript, PHP). Grouped by\nmodule, with the columns written, evidence lines and the entry-point kinds that reach each writer. A writer on a database\nconnection other than the default shows `conn=<name>`; `connection` keeps only the writers on that connection (no match\nlists the connections seen).","inputSchema":{"properties":{"connection":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Connection"},"limit":{"default":60,"title":"Limit","type":"integer"},"table":{"title":"Table","type":"string"}},"required":["table"],"title":"writersArguments","type":"object"},"name":"writers","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Broadcast channels (Laravel Broadcast::channel, events' broadcastOn, Echo / pusher-js subscriptions on a combined\ngraph). Without a pattern: one line per channel with its auth callback / checks, publishers and subscribers. With\na pattern (`orders.{id}`, a concrete name like `orders.42`, or a glob `orders.*`): WHO CAN JOIN (broadcasting auth\nroute + middleware, the callback with its source and every check it calls), PUBLISHED BY (events, the evaluated\nchannel name, dispatch sites and the entry points that reach them) and LISTENED TO BY (client code, pages, events\nlistened for). Flags private channels without a callback and subscriptions that match no backend channel.","inputSchema":{"properties":{"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"source":{"default":true,"title":"Source","type":"boolean"}},"title":"channelsArguments","type":"object"},"name":"channels","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Web / native bridge calls: Capacitor plugins (registerPlugin / Plugins.X -> @CapacitorPlugin @PluginMethod,\nCAPPlugin), React Native and Expo native modules (NativeModules / TurboModuleRegistry / requireNativeModule ->\n@ReactMethod, Native*Spec overrides, RCT_EXPORT_METHOD / RCT_EXTERN_METHOD, Expo Function / AsyncFunction) and\nFlutter platform channels (MethodChannel.invokeMethod / EventChannel -> setMethodCallHandler / setStreamHandler).\nOne endpoint per module method (endpoint:<protocol>:<module>#<method>) with its JS / Dart senders and the native\nreceivers per platform; flags methods missing on a target (missing_on), sent methods of a module implemented here\nthat no native code receives (no_receiver), native methods nothing sends (no_sender) and modules implemented outside\nthe repo (external). Desktop process boundaries too: Electron IPC channels (endpoint:electron-ipc:<channel>,\nipcRenderer.invoke / send / webContents.send -> ipcMain.handle / on, ipcRenderer.on), the context bridge\n(endpoint:electron-preload:<key>#<member>) and Tauri commands (endpoint:tauri:<command>, invoke -> #[tauri::command]);\ntheir receivers carry the process role (main / preload / renderer / webview / core). Native -> JS events\n(react-native-event, capacitor-event) and Cordova actions (cordova) too; calls with a dynamic name are listed as\nunresolved. pattern: endpoint name, substring or glob; protocol: capacitor | capacitor-event | cordova |\nreact-native | react-native-event | flutter | flutter-event | pigeon | electron-ipc | electron-preload | tauri;\nunmatched: only endpoints with a check.","inputSchema":{"properties":{"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Protocol"},"unmatched":{"default":false,"title":"Unmatched","type":"boolean"}},"title":"bridgesArguments","type":"object"},"name":"bridges","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Every protocol endpoint in one view (#31 model): HTTP client endpoints and routes (http / ws / graphql), Pusher\nbroadcast channels and subscriptions, NestJS microservice messages (nest-rpc / nest-event / nest-ws / grpc), job\nqueues (bull, laravel-queue, celery), application events (laravel-event, nest-event-emitter, django-signal), web /\nnative bridges and desktop IPC (capacitor, react-native, flutter, electron-ipc, tauri ...) and the generic\nendpoint:<protocol>:<name> nodes (code -SENDS_TO-> endpoint -RECEIVED_BY-> handler, MATCHES_ENDPOINT for\nwildcard / template matches; MQTT, NATS, AMQP, Kafka, Redis pub/sub, Socket.IO, raw TCP / UDP sockets by port).\nlisteners: every listening TCP / UDP socket with bind address, exposure and handler. Without arguments: one line per\nprotocol (endpoints, send / receive sides, linked, check counts). With a pattern (name, id, substring or glob) /\nprotocol / side (send | receive) / unmatched: one block per endpoint with senders (and, for a few endpoints, the\nentry points reaching them), receivers, guards, matches and checks: no_receiver, no_sender, test_sender_only,\nambiguous, schema_mismatch, unguarded, external (.cg.yaml protocols.external, third-party origins, bridge\npackages). impact / reaches / path / downstream follow SENDS_TO / RECEIVED_BY / MATCHES_ENDPOINT as usual.","inputSchema":{"properties":{"listeners":{"default":false,"title":"Listeners","type":"boolean"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Protocol"},"side":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Side"},"unmatched":{"default":false,"title":"Unmatched","type":"boolean"}},"title":"protocol_linksArguments","type":"object"},"name":"protocol_links","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"External systems the code connects to (#40): databases, caches, brokers, mail relays, directories, file-transfer\nhosts, object stores (external:<protocol>:<target>, target host:port when known from a DSN, .env.example or a\ndocker-compose service, else env:<KEY>) and third-party HTTP hosts; per system the code and logical connections\nusing it (CONNECTS_TO), the entry points reaching them, the address source and the credential source (location\nonly, never the value), TLS when known. protocol: postgres | mysql | redis | smtp | amqp | mongodb | ldap | ssh |\nftp | s3 | https ...; source: literal | env | env-example | compose | config; tls_off: only plaintext systems.","inputSchema":{"properties":{"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Protocol"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source"},"tls_off":{"default":false,"title":"Tls Off","type":"boolean"}},"title":"external_systemsArguments","type":"object"},"name":"external_systems","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Security views over recorded facts (#47): findings plus the inbound / outbound attack surface, with file:line\nevidence, confidence and the entry points reaching each finding. Findings: hardcoded (literal credential in a DSN,\nSDK constructor or config; the value is never shown), plaintext (external system without TLS, non-loopback host),\nunverified (webhook route that never verifies its signature), unguarded (inbound route / handler with no auth guard,\nthe `routes` rule; strict: route guards only), exposed-listener (TCP / UDP bound to all interfaces), tls-off\n(certificate or SSH host key verification switched off), ipc-exposed (postMessage to '*', world-writable Unix socket,\nwildcard externally_connectable, Electron nodeIntegration / contextIsolation off; plaintext also covers insecure gRPC\nchannels), ssrf (host or whole URL of an outbound HTTP call built from request input; a DNS lookup of request input is\nreported at medium severity; path- or query-only input and allow-listed hosts are recorded, not reported). inbound=true\nlists routes, webhooks, sockets, consumers and IPC handlers with guard state and whether they reach a write;\noutbound=true lists every external system with address source, credential source and TLS. protocol narrows both;\nfinding: hardcoded | plaintext | unverified | unguarded | exposed-listener | tls-off | ipc-exposed | ssrf; min_confidence: heuristic | resolved |\nexact. Findings accepted in .cg.yaml surface.ignore are counted (show_ignored lists them). The structured reply\ncarries the full result under `surface` (the `cg surface --format json` shape); SARIF is `cg surface --format sarif`.\nDetails: `external_systems`, `protocol_links`, `routes`.","inputSchema":{"properties":{"finding":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finding"},"inbound":{"default":false,"title":"Inbound","type":"boolean"},"max_items":{"default":60,"title":"Max Items","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"outbound":{"default":false,"title":"Outbound","type":"boolean"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Protocol"},"show_ignored":{"default":false,"title":"Show Ignored","type":"boolean"},"strict":{"default":false,"title":"Strict","type":"boolean"}},"title":"attack_surfaceArguments","type":"object"},"name":"attack_surface","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"LLM tools and MCP primitives (#66): tools offered to a model (OpenAI / Anthropic schema literals, LangChain @tool /\nStructuredTool / BaseTool, Agents SDK @function_tool, LlamaIndex FunctionTool, dict registries and if / match branches\nof agent loops) and MCP server tools / resources / prompts (FastMCP / MCPServer, low-level call_tool) with their\nhandler, the tables the handler reaches, the agents offering them and the code calling them (MCP client call_tool /\nread_resource / get_prompt). Checks: no_receiver, no_sender, name_collision; plus agents (model, tools, handoffs),\ndynamic_dispatch (an agent loop picking the tool by a runtime name, not linked) and model calls. framework: mcp |\nopenai | anthropic | langchain | openai-agents | llamaindex | custom.","inputSchema":{"properties":{"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Agent"},"framework":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Framework"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"unmatched":{"default":false,"title":"Unmatched","type":"boolean"}},"title":"llm_toolsArguments","type":"object"},"name":"llm_tools","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Tests that exercise a symbol, route or table. DIRECT: the test code itself calls / instantiates it or sends an\nHTTP request to the route ($this->getJson('/x'), Playwright request.get). TRANSITIVE: through application code\n(test -> route -> controller -> service -> target). target: Class::method | Class | route:VERB /uri | `VERB /path`\nor /path (matched against route URIs) | table.column | any node id. Tests are PHPUnit / Pest (tests/), Vitest / Jest\n/ Playwright / Cypress spec files; they never count as callers in the other queries. A base / interface method\nalso lists the tests of its overrides, marked `via override X`; `Sub.method` for an inherited method resolves to\nthe definition it inherits (noted). Transitive tests are kept near the target: at most max_depth hops (0: any\ndepth), not through an app entry point (`@main` types and their members such as `App.body`, Android `*Activity`\nclasses, exclude_roots symbols; through_roots=true keeps them). UI / snapshot / screenshot tests (XCUITest,\nCompose UI / Espresso, Playwright / Cypress, *UITests / androidTest folders) are listed apart, or left out\nwith unit_only=true. The summary line counts what was left out and why.","inputSchema":{"properties":{"exclude_roots":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Exclude Roots"},"max_depth":{"default":3,"title":"Max Depth","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"paths":{"default":true,"title":"Paths","type":"boolean"},"target":{"title":"Target","type":"string"},"through_roots":{"default":false,"title":"Through Roots","type":"boolean"},"unit_only":{"default":false,"title":"Unit Only","type":"boolean"}},"required":["target"],"title":"tests_coveringArguments","type":"object"},"name":"tests_covering","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Tests and entry points a change reaches. files are whole repo-relative paths; base is a git\nrevision and only the touched lines count (innermost symbol). A rename or deletion still resolves\nfrom the index, and a changed test is listed itself. quiet prints one test file path per line.\nmax_depth keeps transitive tests near the target (0: any); unit_only leaves out UI / snapshot tests.","inputSchema":{"properties":{"base":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Base"},"files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Files"},"max_depth":{"default":3,"title":"Max Depth","type":"integer"},"quiet":{"default":false,"title":"Quiet","type":"boolean"},"unit_only":{"default":false,"title":"Unit Only","type":"boolean"}},"title":"affectedArguments","type":"object"},"name":"affected","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use to inspect a symbol without reading its file. Details of one node: kind, FQN, file:line span, module, entry kinds, docblock (PHPDoc), and edge counts\nby kind (in/out) with a few neighbours. Specs: Class::method | file#name | table.column | table:<t> |\nroute:<METHOD> <uri> | env:<KEY> | page:/path (more: resource cg://guide).","inputSchema":{"properties":{"id_or_symbol":{"title":"Id Or Symbol","type":"string"}},"required":["id_or_symbol"],"title":"nodeArguments","type":"object"},"name":"node","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use instead of opening a whole file. Source of one symbol: a `path:start-end` header then the body with line numbers. Resolves a\nnode id or a symbol / FQN (as node() and search() do); an ambiguous name lists the candidates\ninstead of guessing. context adds lines around the span; max_lines caps the body (truncation noted).","inputSchema":{"properties":{"context":{"default":0,"title":"Context","type":"integer"},"id_or_symbol":{"title":"Id Or Symbol","type":"string"},"max_lines":{"default":200,"title":"Max Lines","type":"integer"}},"required":["id_or_symbol"],"title":"snippetArguments","type":"object"},"name":"snippet","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use first to find a symbol instead of grep. Finds nodes by name / FQN substring (case-insensitive), optionally filtered by kind\n(class, method, route, command, table, column, connection, config, env, job, admin...). Also matches route\nmiddleware, guards, auth and access checks (e.g. \"auth\" finds `auth:api`, `ApiKeyGuard`, `IsAuthenticated`) and\nlists the routes that carry them. Platform-specific symbols carry their targets, e.g. `[ios, android]`.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Kind"},"limit":{"default":20,"title":"Limit","type":"integer"},"name":{"title":"Name","type":"string"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"}},"required":["name"],"title":"searchArguments","type":"object"},"name":"search","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Start here for a broad question (\"how does X work\") or a spec you have not pinned down.\nResolves a few symbols and returns their source, entry points, call paths and blast radius\nin one call, inside budget_tokens. Prefer this over impact, downstream, path and snippet\nuntil you know which symbol matters. The reply ends with the fine-grained calls to run next.\nmax_symbols caps how many matches are expanded (default 4).","inputSchema":{"properties":{"budget_tokens":{"default":3000,"title":"Budget Tokens","type":"integer"},"max_symbols":{"default":4,"title":"Max Symbols","type":"integer"},"query":{"title":"Query","type":"string"}},"required":["query"],"title":"exploreArguments","type":"object"},"name":"explore","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use for route, auth and middleware questions. Routes with their middleware / guards / auth, in one call. Optional scope: writes=\"*\" (routes that reach any\nDB write) or writes=\"<table>\", reaches=[specs] (routes that reach any of these nodes: table, column, connection,\nmethod, env key...). Optional filters: missing=\"<name>\" keeps routes with no guard whose name contains it (e.g.\n\"auth:api\", \"ApiKeyGuard\"), unguarded=true keeps routes with no auth guard (the framework presets' auth guards and\nthe auth name pattern; extend with auth_pattern, a regex, or .cg.yaml auth.extra_patterns). An unconditional\ninline check on a Laravel action (authorize, Gate, a permission check, FormRequest::authorize, controller\nmiddleware, a shared-secret compare) is listed under guards as `inline:` and counts for unguarded. strict=true\nwith unguarded counts only route-level guards. Each route: guards, what it reaches with one evidence chain, and the frontend callers on a\ncombined graph. Guards come from Laravel middleware, Nest guards/interceptors, Express/Koa/Fastify/Hono/Elysia\nmiddleware, Next.js middleware.ts / handler wrappers, django-ninja auth= and Django/DRF view access checks.\nmin_confidence: keep the default (heuristic) for reviews: every edge still shows its own label, and a stricter\nlevel names the routes it hides.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"auth_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Auth Pattern"},"max_items":{"default":40,"title":"Max Items","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"missing":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Missing"},"paths":{"default":true,"title":"Paths","type":"boolean"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"},"reaches":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Reaches"},"strict":{"default":false,"title":"Strict","type":"boolean"},"unguarded":{"default":false,"title":"Unguarded","type":"boolean"},"writes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Writes"}},"title":"routesArguments","type":"object"},"name":"routes","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"What this cg installation can index: versions of cg and the tools it uses, whether the Node / PHP / Dart\nextractor dependencies are installed, and per language whether indexing runs in exact or heuristic mode, why, and\nthe command that installs what is missing. `root`: a project directory; also checks project conditions (a\ncompile_commands.json, `.cg.yaml` rust.targets) and lists only its languages. `scip`: SCIP index files to check\n(documents, occurrences with a usable position, definitions; a warning when cg could not use them).","inputSchema":{"properties":{"json_output":{"default":false,"title":"Json Output","type":"boolean"},"root":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Root"},"scip":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Scip"}},"title":"doctorArguments","type":"object"},"name":"doctor","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use when cg finds nothing or you need to know if a file is indexed. Which languages and files this index covers. Per language: parser mode (exact, heuristic only when an\nexact-mode indexer such as rust-analyzer or scip-clang is missing, skipped when the toolchain is missing, with the\ninstall hint) and file completeness (discovered vs indexed, with parse failures, files over the size limit,\nunmapped files outside the source roots, excluded files); unsupported source types by extension or shebang\n(.go .qml .sh ...); blind spots: route / handler registrations cg does not model, with file:line.\npath (optional): a file or directory; says whether cg has it in the graph. all_files: list every file per bucket\n(default: the first 5). json_output: the completeness object as JSON. Not covered, heuristic or a blind spot\nmeans: use your normal search and file reading for that part.","inputSchema":{"properties":{"all_files":{"default":false,"title":"All Files","type":"boolean"},"json_output":{"default":false,"title":"Json Output","type":"boolean"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Path"}},"title":"coverageArguments","type":"object"},"name":"coverage","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Starter queries derived from this graph, each with the tool call to run: the write route without an auth guard\nthat writes the most tables, the most-written / most-read table, the most-used DB connection and env key, the page\nwith the largest backend reach, the most-called functions. A good first call on an unfamiliar repository.","inputSchema":{"properties":{},"title":"startersArguments","type":"object"},"name":"starters","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Index metadata and node/edge counts by kind.","inputSchema":{"properties":{},"title":"statsArguments","type":"object"},"name":"stats","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use to see what X ends up calling or reading (page -> routes -> tables). Forward dependencies of a node. On a combined graph a frontend page goes\npage -> composables/components -> HTTP endpoints -> backend routes -> controllers/services -> tables.\nLists backend routes, tables touched (directly or via columns), columns, connections, config/env keys, each\nwith one shortest evidence path. target: page:/reports/:id | app/pages/x.vue | Class::method | ...\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"max_per_kind":{"default":25,"title":"Max Per Kind","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"paths":{"default":true,"title":"Paths","type":"boolean"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"},"target":{"title":"Target","type":"string"}},"required":["target"],"title":"downstreamArguments","type":"object"},"name":"downstream","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use to answer \"how does A reach B\". Shortest forward evidence chain from source to target (e.g. page:/reports/:id ->\nSalesReportService::report), one hop per line with file:line and confidence.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"},"source":{"title":"Source","type":"string"},"target":{"title":"Target","type":"string"}},"required":["source","target"],"title":"pathArguments","type":"object"},"name":"path","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Platform-specific code in this graph: the targets (declared in .cg.yaml platforms.targets, or detected from\nFlutter platform folders, Expo app.json, React Native, Electron / Tauri, or the conditions themselves), how many\nconditions (#[cfg], cfg!, #if, Platform.OS / Platform.select, Platform.isX / kIsWeb, .ios.ts / .android.ts /\n.native.ts files, Dart conditional imports) were found and evaluated, and files / symbols per target. Pass\n`platform` to reaches / impact / downstream / path / routes / search to see one target's build.","inputSchema":{"properties":{},"title":"platformsArguments","type":"object"},"name":"platforms","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Where per-platform implementations diverge: VARIANTS (a symbol implemented per platform, by platform files,\nconditional imports or #[cfg] / #if alternatives, with the declared targets no variant covers), API SURFACE (a\nvariant lacks a public symbol its siblings define) and REFERENCED WHERE THE CALLEE IS NOT BUILT (a call or\nimport that is live on a target where the callee does not exist: a build or runtime failure there). Each finding\nhas file:line evidence. DEAD BRANCHES: code under nested conditions no target meets together (`#elseif os(macOS)`\ninside `#if os(iOS)`); its references are left out of the graph. target: only findings that affect this target.\nkind: variants | api_surface | missing_callee | missing_callee_tests | dead_branch.","inputSchema":{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Kind"},"max_items":{"default":40,"title":"Max Items","type":"integer"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Target"}},"title":"platform_divergenceArguments","type":"object"},"name":"platform_divergence","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Frontend HTTP calls (method + path template) with call sites, request keys and the matched backend\nroute + controller (combined graph). filter: all | unmatched | any substring (endpoint, route, caller, file) |\na `*` glob (`GET /v1/*/orders*`, `*/staff/*`, `*useOrders*`) on the endpoint, its path, route, controller,\ncaller or call-site file. `route:VERB /path` is an exact route match (verb case-insensitive; `:id`, `{id}` and\n`{order}` match one param segment). `route:POST /payments/*` or `route:* /payments` widens it. An unknown\nroute returns `no such route` and the nearest routes. A call site with no entry point is marked\n`(no live caller)` and `filter='dead'` lists matched endpoints with no live call site.","inputSchema":{"properties":{"filter":{"default":"all","title":"Filter","type":"string"},"max_items":{"default":60,"title":"Max Items","type":"integer"}},"title":"api_callsArguments","type":"object"},"name":"api_calls","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"List planned-change files (plans/*.yaml): name, status, title, counts, schema errors.","inputSchema":{"properties":{},"title":"plan_listArguments","type":"object"},"name":"plan_list","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Show one plan (name or path): planned nodes (+), modified targets with intent (~), planned edges, forbidden\npaths (x), requirements (!), covers/out_of_scope, precedents, linked issues, schema errors.","inputSchema":{"properties":{"name":{"title":"Name","type":"string"}},"required":["name"],"title":"plan_loadArguments","type":"object"},"name":"plan_load","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Schema check + does every referenced existing node resolve in the graph (unresolved / ambiguous specs with\ncandidates); planned nodes that already exist are flagged.","inputSchema":{"properties":{"name":{"title":"Name","type":"string"}},"required":["name"],"title":"plan_validateArguments","type":"object"},"name":"plan_validate","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Deterministic check of a plan against the real graph. Default reply: a compact summary (counts per section and\nper check, the top `max_items` missing items, failed requirements, middleware gaps, forbidden paths, open findings,\nverify counts); details=true gives the full report (every item with file:line evidence and call chains, up to\nmax_items per list).\nplan mode: 1 RESOLVE (references, route middleware requirements, middleware differences between entry routes of\nthe same modified code), 2 MISSING FROM PLAN (writers/readers of changed tables, Filament/API resources, $fillable,\nform requests, entry points + callers of modified methods, frontend pages and external client snapshots calling\naffected routes, parallel/legacy mirrors, precedents), 3 CONFLICTS (forbidden paths still in the code with their\ncall chain, open findings touching the same nodes, linked or not), plus entry call chains.\nverify=true (after implementation + re-index): also 4 VERIFY: planned nodes/edges exist now (with evidence),\nmodified targets changed vs baseline, forbidden paths gone or guarded, requirements met.","inputSchema":{"properties":{"details":{"default":false,"title":"Details","type":"boolean"},"max_chars":{"default":30000,"title":"Max Chars","type":"integer"},"max_items":{"default":5,"title":"Max Items","type":"integer"},"name":{"title":"Name","type":"string"},"review":{"default":true,"title":"Review","type":"boolean"},"verify":{"default":false,"title":"Verify","type":"boolean"}},"required":["name"],"title":"plan_checkArguments","type":"object"},"name":"plan_check","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Fingerprint (sha1 of source lines) every modified target of a plan before implementing it, so\nplan_check(verify=true) can report changed/UNCHANGED. Writes plans/<name>.baseline.json (only file it writes).","inputSchema":{"properties":{"name":{"title":"Name","type":"string"}},"required":["name"],"title":"plan_baselineArguments","type":"object"},"name":"plan_baseline","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use after editing so later answers see the change. Re-index (static analysis only: never boots the app or touches a database).\nOn a combined graph (any number of repos): with no arguments every repo is re-indexed from its recorded root and the\ncross-repo link is rebuilt; repo (a name used at link time) re-indexes just that repo; root is matched to the\nrecorded repo roots (a repo directory, a path inside one, or a parent of several). A root that matches no repo, or\na result with 0 nodes, is refused and the graph is left unchanged.\nOn a single-repo graph root defaults to the indexed root; gates is a gate-scenario JSON path (defaults to the\nserver's --gates). The project config file (.cg.yaml at the root) is read on every\nre-index; Python source roots given with `cg index --python-root` and `--include-generated` are kept.\nGenerated, copied and vendored files stay out of the graph (the coverage tool lists them) unless the graph was\nindexed with --include-generated or .cg.yaml sets generated.include.","inputSchema":{"properties":{"gates":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Gates"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Repo"},"root":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Root"}},"title":"indexArguments","type":"object"},"name":"index","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use when unsure which graph a question belongs to. Lists the graphs this server can query: name, repo roots, languages, indexed commit and freshness.\nOne `cg-mcp` process serves every registered graph. Pass `graph` to other tools to choose one, or omit it\nand the server resolves from a path in the call, then MCP roots or the working directory, then the configured\ndefault. An ambiguous choice returns the list instead of guessing.","inputSchema":{"properties":{},"title":"graphsArguments","type":"object"},"name":"graphs","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}}],"ttlMs":0}}}
{"at":"2026-11-23T01:55:41.327Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T01:55:42.335Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"Use cg before grep or opening files for questions about where code is, what calls what, or what a change affects. `search` finds a symbol; before editing, `impact` (callers up to entry points) or `reaches` (every dependent) shows what the change affects; `snippet` reads one symbol instead of a whole file; `explore` answers a broad 'how does X work' in one call. Unsure which graph? Call `graphs`. Fall back to normal search only for what cg reports as not covered (`coverage`, a `coverage note:` line). Spec forms and stack notes: resource cg://guide.","protocolVersion":"2025-11-25","serverInfo":{"name":"code-graph","version":""}}}}
{"at":"2026-11-23T01:55:42.335Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T01:55:42.335Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T01:55:42.338Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Use before changing a column, table, connection, env key or symbol: everything that depends on it.\nReverse transitive dependents of one or more targets (union), e.g.\n[\"orders.customer_id\", \"connection:warehouse\", \"connection:tenant_*\"].\n\nGroups: RUNTIME (live; reached from http routes/schedules/jobs/listeners, or main()/exported FFI symbols in\nRust/C/C++), LIBRARY (only via a library's public API), DEV (only tests/benches/examples/build scripts), OPERATOR (artisan commands /\nadmin panels only: one-off import & provisioning), GATED (dead under the indexed gate scenario, e.g.\ncode that only runs while a feature flag is off), NO-ENTRY. Inside each group items are grouped by\n`group_by` = module | entry_kind | class. Each line: symbol, entry kinds, depth, shortest evidence path\n(hops KIND@file:line; ~r = resolved, ~h = heuristic confidence). At most `max_per_group` lines per top-level\ngroup (shallowest first). min_confidence: heuristic | resolved | exact.\nA hop on a database connection other than the default shows `conn=<name>` (dynamic names as a pattern, `?` when it\ncannot be resolved). connection: only the table / column edges that go to that connection (a dynamic name by its\npattern, e.g. `legacy_{store.id}`); no match lists the connections seen.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"connection":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Connection"},"group_by":{"default":"module","title":"Group By","type":"string"},"include_gated":{"default":true,"title":"Include Gated","type":"boolean"},"max_per_group":{"default":25,"title":"Max Per Group","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"paths":{"default":true,"title":"Paths","type":"boolean"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"},"targets":{"items":{"type":"string"},"title":"Targets","type":"array"}},"required":["targets"],"title":"reachesArguments","type":"object"},"name":"reaches","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use before editing a function: what a change to it affects. Reverse callers of a method (Class::method, short or FQN) up to entry points, with the shortest call path\nfrom each entry point.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"max_items":{"default":60,"title":"Max Items","type":"integer"},"method":{"title":"Method","type":"string"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"paths":{"default":true,"title":"Paths","type":"boolean"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"}},"required":["method"],"title":"impactArguments","type":"object"},"name":"impact","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use to see who calls X right now. Direct callers of a function / method / class (one level: CALLS, INSTANTIATES, dispatch and framework edges\ninto it), each with the call site file:line and confidence. For the full chain up to entry points use impact().","inputSchema":{"properties":{"limit":{"default":60,"title":"Limit","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"symbol":{"title":"Symbol","type":"string"}},"required":["symbol"],"title":"callersArguments","type":"object"},"name":"callers","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Code parallel to a symbol that often needs the same change: classes sharing its parent/interface/trait,\nthe same method in sibling classes, other code touching the same tables/columns/config/connections, and\nco-callers (methods calling the same helpers; Jaccard on callees).","inputSchema":{"properties":{"limit":{"default":15,"title":"Limit","type":"integer"},"symbol":{"title":"Symbol","type":"string"}},"required":["symbol"],"title":"siblingsArguments","type":"object"},"name":"siblings","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Every place a concept (e.g. 'timezone', 'locale') is resolved, deterministically: assignment/return sites\nwhose value is a `??`/`?:` chain or an ordered sequence of early returns, expanded into a fallback chain of\nrequest input keys (FormRequest rules / $request->input / $filters['x'] through helper calls), settings\n(getSetting(key, default)), model columns, config/env and literal defaults. Sites are grouped into lettered\nchains by signature; the divergence section shows pairwise where chains first differ; each chain lists the\nroutes that reach it. On a combined graph, also the frontend side: whether each matched client call sends the\nkey (builder keys + call-site argument keys) and client literal fallbacks (`x ?? 'UTC'`).\n`within` filters owning functions by substring (e.g. 'Report'); `detail=True` lists every client call site and\nthe keys it passes (default: one line per client request with its verdict).","inputSchema":{"properties":{"client":{"default":true,"title":"Client","type":"boolean"},"concept":{"title":"Concept","type":"string"},"detail":{"default":false,"title":"Detail","type":"boolean"},"max_chars":{"default":40000,"title":"Max Chars","type":"integer"},"within":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Within"}},"required":["concept"],"title":"resolutionsArguments","type":"object"},"name":"resolutions","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Heuristic (#88): does a stored property `Type.prop` round-trip through a lossy transform? Each write site with\nthe lossy call it passes through (clamp, min/max, round, truncating casts, `fit*`, `.cg.yaml` `lossy:` names,\n`@cg-lossy` functions; within the function plus one hop through direct callers), each read site that seeds UI\nstate (init, onAppear, remember, useState(initial), mounted), and un-narrowed ranges drawn next to such a read.\nFindings are heuristic evidence with file:line, not proof. An empty `prop` (or `*`) checks every stored property\nin one pass and lists only the round trips.","inputSchema":{"properties":{"include_tests":{"default":false,"title":"Include Tests","type":"boolean"},"prop":{"default":"","title":"Prop","type":"string"}},"title":"roundtripArguments","type":"object"},"name":"roundtrip","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Heuristic (#88 phase 3); `rules` is a comma-separated subset (default all). stale-async-result: a write of\nstored / UI state inside Task / launch / useEffect / async function / async def code after an await, using the\nawaited result of an input-dependent request, with no cancellation check and no comparison against a token / ID /\ngeneration captured before the await. two-writers: state written with real (computed) values by lifecycle code\n(init, onAppear, useEffect, LaunchedEffect) and by async code after an await or a completion callback.\nincomplete-cache-key: a cache / memo store whose key leaves out a parameter or instance field the cached value\nuses. echo-suppression: state that is written with a guard flag set (`isApplyingRemote`, `lastSent…`) so its\nobserver returns early, but is also written from async code without the guard. file:line evidence; not proof.","inputSchema":{"properties":{"include_tests":{"default":false,"title":"Include Tests","type":"boolean"},"limit":{"default":80,"title":"Limit","type":"integer"},"rules":{"default":"","title":"Rules","type":"string"}},"title":"lint_async_stateArguments","type":"object"},"name":"lint_async_state","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Who reads a DB table, a column or a stored property. `prop` is `table`, `table:X`, `table.column` / `column:table.column`\n(READS_TABLE / READS_COLUMN edges, grouped by column; heuristic string-literal MENTIONS_COLUMN matches come last and are\nlabelled) or `Type.prop` / `Class::$prop` (READS_PROP edges: Swift, Kotlin, Python, TypeScript, PHP). Each site with the\nentry-point kinds that reach it; test code's property reads come last. An unknown spec lists what was tried, the table's\ncolumns and close matches. A site on a database connection other than the default shows `conn=<name>`; `connection`\nkeeps only the sites on that connection (no match lists the connections seen).","inputSchema":{"properties":{"connection":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Connection"},"limit":{"default":60,"title":"Limit","type":"integer"},"prop":{"title":"Prop","type":"string"}},"required":["prop"],"title":"readersArguments","type":"object"},"name":"readers","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Who writes a DB table, a column or a stored property. `table` is `table`, `table:X`, `table.column` / `column:table.column`\n(WRITES_TABLE / WRITES_COLUMN edges; for a column, the writers of that column, then a separate \"table-level writes (columns\nnot recorded)\" group) or `Type.prop` / `Class::$prop` (WRITES_PROP edges: Swift, Kotlin, Python, TypeScript, PHP). Grouped by\nmodule, with the columns written, evidence lines and the entry-point kinds that reach each writer. A writer on a database\nconnection other than the default shows `conn=<name>`; `connection` keeps only the writers on that connection (no match\nlists the connections seen).","inputSchema":{"properties":{"connection":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Connection"},"limit":{"default":60,"title":"Limit","type":"integer"},"table":{"title":"Table","type":"string"}},"required":["table"],"title":"writersArguments","type":"object"},"name":"writers","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Broadcast channels (Laravel Broadcast::channel, events' broadcastOn, Echo / pusher-js subscriptions on a combined\ngraph). Without a pattern: one line per channel with its auth callback / checks, publishers and subscribers. With\na pattern (`orders.{id}`, a concrete name like `orders.42`, or a glob `orders.*`): WHO CAN JOIN (broadcasting auth\nroute + middleware, the callback with its source and every check it calls), PUBLISHED BY (events, the evaluated\nchannel name, dispatch sites and the entry points that reach them) and LISTENED TO BY (client code, pages, events\nlistened for). Flags private channels without a callback and subscriptions that match no backend channel.","inputSchema":{"properties":{"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"source":{"default":true,"title":"Source","type":"boolean"}},"title":"channelsArguments","type":"object"},"name":"channels","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Web / native bridge calls: Capacitor plugins (registerPlugin / Plugins.X -> @CapacitorPlugin @PluginMethod,\nCAPPlugin), React Native and Expo native modules (NativeModules / TurboModuleRegistry / requireNativeModule ->\n@ReactMethod, Native*Spec overrides, RCT_EXPORT_METHOD / RCT_EXTERN_METHOD, Expo Function / AsyncFunction) and\nFlutter platform channels (MethodChannel.invokeMethod / EventChannel -> setMethodCallHandler / setStreamHandler).\nOne endpoint per module method (endpoint:<protocol>:<module>#<method>) with its JS / Dart senders and the native\nreceivers per platform; flags methods missing on a target (missing_on), sent methods of a module implemented here\nthat no native code receives (no_receiver), native methods nothing sends (no_sender) and modules implemented outside\nthe repo (external). Desktop process boundaries too: Electron IPC channels (endpoint:electron-ipc:<channel>,\nipcRenderer.invoke / send / webContents.send -> ipcMain.handle / on, ipcRenderer.on), the context bridge\n(endpoint:electron-preload:<key>#<member>) and Tauri commands (endpoint:tauri:<command>, invoke -> #[tauri::command]);\ntheir receivers carry the process role (main / preload / renderer / webview / core). Native -> JS events\n(react-native-event, capacitor-event) and Cordova actions (cordova) too; calls with a dynamic name are listed as\nunresolved. pattern: endpoint name, substring or glob; protocol: capacitor | capacitor-event | cordova |\nreact-native | react-native-event | flutter | flutter-event | pigeon | electron-ipc | electron-preload | tauri;\nunmatched: only endpoints with a check.","inputSchema":{"properties":{"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Protocol"},"unmatched":{"default":false,"title":"Unmatched","type":"boolean"}},"title":"bridgesArguments","type":"object"},"name":"bridges","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Every protocol endpoint in one view (#31 model): HTTP client endpoints and routes (http / ws / graphql), Pusher\nbroadcast channels and subscriptions, NestJS microservice messages (nest-rpc / nest-event / nest-ws / grpc), job\nqueues (bull, laravel-queue, celery), application events (laravel-event, nest-event-emitter, django-signal), web /\nnative bridges and desktop IPC (capacitor, react-native, flutter, electron-ipc, tauri ...) and the generic\nendpoint:<protocol>:<name> nodes (code -SENDS_TO-> endpoint -RECEIVED_BY-> handler, MATCHES_ENDPOINT for\nwildcard / template matches; MQTT, NATS, AMQP, Kafka, Redis pub/sub, Socket.IO, raw TCP / UDP sockets by port).\nlisteners: every listening TCP / UDP socket with bind address, exposure and handler. Without arguments: one line per\nprotocol (endpoints, send / receive sides, linked, check counts). With a pattern (name, id, substring or glob) /\nprotocol / side (send | receive) / unmatched: one block per endpoint with senders (and, for a few endpoints, the\nentry points reaching them), receivers, guards, matches and checks: no_receiver, no_sender, test_sender_only,\nambiguous, schema_mismatch, unguarded, external (.cg.yaml protocols.external, third-party origins, bridge\npackages). impact / reaches / path / downstream follow SENDS_TO / RECEIVED_BY / MATCHES_ENDPOINT as usual.","inputSchema":{"properties":{"listeners":{"default":false,"title":"Listeners","type":"boolean"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Protocol"},"side":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Side"},"unmatched":{"default":false,"title":"Unmatched","type":"boolean"}},"title":"protocol_linksArguments","type":"object"},"name":"protocol_links","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"External systems the code connects to (#40): databases, caches, brokers, mail relays, directories, file-transfer\nhosts, object stores (external:<protocol>:<target>, target host:port when known from a DSN, .env.example or a\ndocker-compose service, else env:<KEY>) and third-party HTTP hosts; per system the code and logical connections\nusing it (CONNECTS_TO), the entry points reaching them, the address source and the credential source (location\nonly, never the value), TLS when known. protocol: postgres | mysql | redis | smtp | amqp | mongodb | ldap | ssh |\nftp | s3 | https ...; source: literal | env | env-example | compose | config; tls_off: only plaintext systems.","inputSchema":{"properties":{"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Protocol"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source"},"tls_off":{"default":false,"title":"Tls Off","type":"boolean"}},"title":"external_systemsArguments","type":"object"},"name":"external_systems","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Security views over recorded facts (#47): findings plus the inbound / outbound attack surface, with file:line\nevidence, confidence and the entry points reaching each finding. Findings: hardcoded (literal credential in a DSN,\nSDK constructor or config; the value is never shown), plaintext (external system without TLS, non-loopback host),\nunverified (webhook route that never verifies its signature), unguarded (inbound route / handler with no auth guard,\nthe `routes` rule; strict: route guards only), exposed-listener (TCP / UDP bound to all interfaces), tls-off\n(certificate or SSH host key verification switched off), ipc-exposed (postMessage to '*', world-writable Unix socket,\nwildcard externally_connectable, Electron nodeIntegration / contextIsolation off; plaintext also covers insecure gRPC\nchannels), ssrf (host or whole URL of an outbound HTTP call built from request input; a DNS lookup of request input is\nreported at medium severity; path- or query-only input and allow-listed hosts are recorded, not reported). inbound=true\nlists routes, webhooks, sockets, consumers and IPC handlers with guard state and whether they reach a write;\noutbound=true lists every external system with address source, credential source and TLS. protocol narrows both;\nfinding: hardcoded | plaintext | unverified | unguarded | exposed-listener | tls-off | ipc-exposed | ssrf; min_confidence: heuristic | resolved |\nexact. Findings accepted in .cg.yaml surface.ignore are counted (show_ignored lists them). The structured reply\ncarries the full result under `surface` (the `cg surface --format json` shape); SARIF is `cg surface --format sarif`.\nDetails: `external_systems`, `protocol_links`, `routes`.","inputSchema":{"properties":{"finding":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finding"},"inbound":{"default":false,"title":"Inbound","type":"boolean"},"max_items":{"default":60,"title":"Max Items","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"outbound":{"default":false,"title":"Outbound","type":"boolean"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Protocol"},"show_ignored":{"default":false,"title":"Show Ignored","type":"boolean"},"strict":{"default":false,"title":"Strict","type":"boolean"}},"title":"attack_surfaceArguments","type":"object"},"name":"attack_surface","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"LLM tools and MCP primitives (#66): tools offered to a model (OpenAI / Anthropic schema literals, LangChain @tool /\nStructuredTool / BaseTool, Agents SDK @function_tool, LlamaIndex FunctionTool, dict registries and if / match branches\nof agent loops) and MCP server tools / resources / prompts (FastMCP / MCPServer, low-level call_tool) with their\nhandler, the tables the handler reaches, the agents offering them and the code calling them (MCP client call_tool /\nread_resource / get_prompt). Checks: no_receiver, no_sender, name_collision; plus agents (model, tools, handoffs),\ndynamic_dispatch (an agent loop picking the tool by a runtime name, not linked) and model calls. framework: mcp |\nopenai | anthropic | langchain | openai-agents | llamaindex | custom.","inputSchema":{"properties":{"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Agent"},"framework":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Framework"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Pattern"},"unmatched":{"default":false,"title":"Unmatched","type":"boolean"}},"title":"llm_toolsArguments","type":"object"},"name":"llm_tools","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Tests that exercise a symbol, route or table. DIRECT: the test code itself calls / instantiates it or sends an\nHTTP request to the route ($this->getJson('/x'), Playwright request.get). TRANSITIVE: through application code\n(test -> route -> controller -> service -> target). target: Class::method | Class | route:VERB /uri | `VERB /path`\nor /path (matched against route URIs) | table.column | any node id. Tests are PHPUnit / Pest (tests/), Vitest / Jest\n/ Playwright / Cypress spec files; they never count as callers in the other queries. A base / interface method\nalso lists the tests of its overrides, marked `via override X`; `Sub.method` for an inherited method resolves to\nthe definition it inherits (noted). Transitive tests are kept near the target: at most max_depth hops (0: any\ndepth), not through an app entry point (`@main` types and their members such as `App.body`, Android `*Activity`\nclasses, exclude_roots symbols; through_roots=true keeps them). UI / snapshot / screenshot tests (XCUITest,\nCompose UI / Espresso, Playwright / Cypress, *UITests / androidTest folders) are listed apart, or left out\nwith unit_only=true. The summary line counts what was left out and why.","inputSchema":{"properties":{"exclude_roots":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Exclude Roots"},"max_depth":{"default":3,"title":"Max Depth","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"paths":{"default":true,"title":"Paths","type":"boolean"},"target":{"title":"Target","type":"string"},"through_roots":{"default":false,"title":"Through Roots","type":"boolean"},"unit_only":{"default":false,"title":"Unit Only","type":"boolean"}},"required":["target"],"title":"tests_coveringArguments","type":"object"},"name":"tests_covering","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Tests and entry points a change reaches. files are whole repo-relative paths; base is a git\nrevision and only the touched lines count (innermost symbol). A rename or deletion still resolves\nfrom the index, and a changed test is listed itself. quiet prints one test file path per line.\nmax_depth keeps transitive tests near the target (0: any); unit_only leaves out UI / snapshot tests.","inputSchema":{"properties":{"base":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Base"},"files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Files"},"max_depth":{"default":3,"title":"Max Depth","type":"integer"},"quiet":{"default":false,"title":"Quiet","type":"boolean"},"unit_only":{"default":false,"title":"Unit Only","type":"boolean"}},"title":"affectedArguments","type":"object"},"name":"affected","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use to inspect a symbol without reading its file. Details of one node: kind, FQN, file:line span, module, entry kinds, docblock (PHPDoc), and edge counts\nby kind (in/out) with a few neighbours. Specs: Class::method | file#name | table.column | table:<t> |\nroute:<METHOD> <uri> | env:<KEY> | page:/path (more: resource cg://guide).","inputSchema":{"properties":{"id_or_symbol":{"title":"Id Or Symbol","type":"string"}},"required":["id_or_symbol"],"title":"nodeArguments","type":"object"},"name":"node","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use instead of opening a whole file. Source of one symbol: a `path:start-end` header then the body with line numbers. Resolves a\nnode id or a symbol / FQN (as node() and search() do); an ambiguous name lists the candidates\ninstead of guessing. context adds lines around the span; max_lines caps the body (truncation noted).","inputSchema":{"properties":{"context":{"default":0,"title":"Context","type":"integer"},"id_or_symbol":{"title":"Id Or Symbol","type":"string"},"max_lines":{"default":200,"title":"Max Lines","type":"integer"}},"required":["id_or_symbol"],"title":"snippetArguments","type":"object"},"name":"snippet","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use first to find a symbol instead of grep. Finds nodes by name / FQN substring (case-insensitive), optionally filtered by kind\n(class, method, route, command, table, column, connection, config, env, job, admin...). Also matches route\nmiddleware, guards, auth and access checks (e.g. \"auth\" finds `auth:api`, `ApiKeyGuard`, `IsAuthenticated`) and\nlists the routes that carry them. Platform-specific symbols carry their targets, e.g. `[ios, android]`.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Kind"},"limit":{"default":20,"title":"Limit","type":"integer"},"name":{"title":"Name","type":"string"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"}},"required":["name"],"title":"searchArguments","type":"object"},"name":"search","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Start here for a broad question (\"how does X work\") or a spec you have not pinned down.\nResolves a few symbols and returns their source, entry points, call paths and blast radius\nin one call, inside budget_tokens. Prefer this over impact, downstream, path and snippet\nuntil you know which symbol matters. The reply ends with the fine-grained calls to run next.\nmax_symbols caps how many matches are expanded (default 4).","inputSchema":{"properties":{"budget_tokens":{"default":3000,"title":"Budget Tokens","type":"integer"},"max_symbols":{"default":4,"title":"Max Symbols","type":"integer"},"query":{"title":"Query","type":"string"}},"required":["query"],"title":"exploreArguments","type":"object"},"name":"explore","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use for route, auth and middleware questions. Routes with their middleware / guards / auth, in one call. Optional scope: writes=\"*\" (routes that reach any\nDB write) or writes=\"<table>\", reaches=[specs] (routes that reach any of these nodes: table, column, connection,\nmethod, env key...). Optional filters: missing=\"<name>\" keeps routes with no guard whose name contains it (e.g.\n\"auth:api\", \"ApiKeyGuard\"), unguarded=true keeps routes with no auth guard (the framework presets' auth guards and\nthe auth name pattern; extend with auth_pattern, a regex, or .cg.yaml auth.extra_patterns). An unconditional\ninline check on a Laravel action (authorize, Gate, a permission check, FormRequest::authorize, controller\nmiddleware, a shared-secret compare) is listed under guards as `inline:` and counts for unguarded. strict=true\nwith unguarded counts only route-level guards. Each route: guards, what it reaches with one evidence chain, and the frontend callers on a\ncombined graph. Guards come from Laravel middleware, Nest guards/interceptors, Express/Koa/Fastify/Hono/Elysia\nmiddleware, Next.js middleware.ts / handler wrappers, django-ninja auth= and Django/DRF view access checks.\nmin_confidence: keep the default (heuristic) for reviews: every edge still shows its own label, and a stricter\nlevel names the routes it hides.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"auth_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Auth Pattern"},"max_items":{"default":40,"title":"Max Items","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"missing":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Missing"},"paths":{"default":true,"title":"Paths","type":"boolean"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"},"reaches":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Reaches"},"strict":{"default":false,"title":"Strict","type":"boolean"},"unguarded":{"default":false,"title":"Unguarded","type":"boolean"},"writes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Writes"}},"title":"routesArguments","type":"object"},"name":"routes","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"What this cg installation can index: versions of cg and the tools it uses, whether the Node / PHP / Dart\nextractor dependencies are installed, and per language whether indexing runs in exact or heuristic mode, why, and\nthe command that installs what is missing. `root`: a project directory; also checks project conditions (a\ncompile_commands.json, `.cg.yaml` rust.targets) and lists only its languages. `scip`: SCIP index files to check\n(documents, occurrences with a usable position, definitions; a warning when cg could not use them).","inputSchema":{"properties":{"json_output":{"default":false,"title":"Json Output","type":"boolean"},"root":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Root"},"scip":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Scip"}},"title":"doctorArguments","type":"object"},"name":"doctor","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use when cg finds nothing or you need to know if a file is indexed. Which languages and files this index covers. Per language: parser mode (exact, heuristic only when an\nexact-mode indexer such as rust-analyzer or scip-clang is missing, skipped when the toolchain is missing, with the\ninstall hint) and file completeness (discovered vs indexed, with parse failures, files over the size limit,\nunmapped files outside the source roots, excluded files); unsupported source types by extension or shebang\n(.go .qml .sh ...); blind spots: route / handler registrations cg does not model, with file:line.\npath (optional): a file or directory; says whether cg has it in the graph. all_files: list every file per bucket\n(default: the first 5). json_output: the completeness object as JSON. Not covered, heuristic or a blind spot\nmeans: use your normal search and file reading for that part.","inputSchema":{"properties":{"all_files":{"default":false,"title":"All Files","type":"boolean"},"json_output":{"default":false,"title":"Json Output","type":"boolean"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Path"}},"title":"coverageArguments","type":"object"},"name":"coverage","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Starter queries derived from this graph, each with the tool call to run: the write route without an auth guard\nthat writes the most tables, the most-written / most-read table, the most-used DB connection and env key, the page\nwith the largest backend reach, the most-called functions. A good first call on an unfamiliar repository.","inputSchema":{"properties":{},"title":"startersArguments","type":"object"},"name":"starters","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Index metadata and node/edge counts by kind.","inputSchema":{"properties":{},"title":"statsArguments","type":"object"},"name":"stats","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use to see what X ends up calling or reading (page -> routes -> tables). Forward dependencies of a node. On a combined graph a frontend page goes\npage -> composables/components -> HTTP endpoints -> backend routes -> controllers/services -> tables.\nLists backend routes, tables touched (directly or via columns), columns, connections, config/env keys, each\nwith one shortest evidence path. target: page:/reports/:id | app/pages/x.vue | Class::method | ...\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"max_per_kind":{"default":25,"title":"Max Per Kind","type":"integer"},"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"paths":{"default":true,"title":"Paths","type":"boolean"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"},"target":{"title":"Target","type":"string"}},"required":["target"],"title":"downstreamArguments","type":"object"},"name":"downstream","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use to answer \"how does A reach B\". Shortest forward evidence chain from source to target (e.g. page:/reports/:id ->\nSalesReportService::report), one hop per line with file:line and confidence.\nplatform: only code built for that target (windows, linux, macos, ios, android, web): code under a platform\ncondition that is false there (#[cfg], #if, Platform.OS / Platform.isX, kIsWeb, .ios.ts / .android.ts files,\nDart conditional imports) is left out; the reply's first line names the filter and how many conditions could not\nbe evaluated (those stay in).","inputSchema":{"properties":{"min_confidence":{"default":"heuristic","title":"Min Confidence","type":"string"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Platform"},"source":{"title":"Source","type":"string"},"target":{"title":"Target","type":"string"}},"required":["source","target"],"title":"pathArguments","type":"object"},"name":"path","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Platform-specific code in this graph: the targets (declared in .cg.yaml platforms.targets, or detected from\nFlutter platform folders, Expo app.json, React Native, Electron / Tauri, or the conditions themselves), how many\nconditions (#[cfg], cfg!, #if, Platform.OS / Platform.select, Platform.isX / kIsWeb, .ios.ts / .android.ts /\n.native.ts files, Dart conditional imports) were found and evaluated, and files / symbols per target. Pass\n`platform` to reaches / impact / downstream / path / routes / search to see one target's build.","inputSchema":{"properties":{},"title":"platformsArguments","type":"object"},"name":"platforms","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Where per-platform implementations diverge: VARIANTS (a symbol implemented per platform, by platform files,\nconditional imports or #[cfg] / #if alternatives, with the declared targets no variant covers), API SURFACE (a\nvariant lacks a public symbol its siblings define) and REFERENCED WHERE THE CALLEE IS NOT BUILT (a call or\nimport that is live on a target where the callee does not exist: a build or runtime failure there). Each finding\nhas file:line evidence. DEAD BRANCHES: code under nested conditions no target meets together (`#elseif os(macOS)`\ninside `#if os(iOS)`); its references are left out of the graph. target: only findings that affect this target.\nkind: variants | api_surface | missing_callee | missing_callee_tests | dead_branch.","inputSchema":{"properties":{"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Kind"},"max_items":{"default":40,"title":"Max Items","type":"integer"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Target"}},"title":"platform_divergenceArguments","type":"object"},"name":"platform_divergence","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Frontend HTTP calls (method + path template) with call sites, request keys and the matched backend\nroute + controller (combined graph). filter: all | unmatched | any substring (endpoint, route, caller, file) |\na `*` glob (`GET /v1/*/orders*`, `*/staff/*`, `*useOrders*`) on the endpoint, its path, route, controller,\ncaller or call-site file. `route:VERB /path` is an exact route match (verb case-insensitive; `:id`, `{id}` and\n`{order}` match one param segment). `route:POST /payments/*` or `route:* /payments` widens it. An unknown\nroute returns `no such route` and the nearest routes. A call site with no entry point is marked\n`(no live caller)` and `filter='dead'` lists matched endpoints with no live call site.","inputSchema":{"properties":{"filter":{"default":"all","title":"Filter","type":"string"},"max_items":{"default":60,"title":"Max Items","type":"integer"}},"title":"api_callsArguments","type":"object"},"name":"api_calls","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"List planned-change files (plans/*.yaml): name, status, title, counts, schema errors.","inputSchema":{"properties":{},"title":"plan_listArguments","type":"object"},"name":"plan_list","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Show one plan (name or path): planned nodes (+), modified targets with intent (~), planned edges, forbidden\npaths (x), requirements (!), covers/out_of_scope, precedents, linked issues, schema errors.","inputSchema":{"properties":{"name":{"title":"Name","type":"string"}},"required":["name"],"title":"plan_loadArguments","type":"object"},"name":"plan_load","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Schema check + does every referenced existing node resolve in the graph (unresolved / ambiguous specs with\ncandidates); planned nodes that already exist are flagged.","inputSchema":{"properties":{"name":{"title":"Name","type":"string"}},"required":["name"],"title":"plan_validateArguments","type":"object"},"name":"plan_validate","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Deterministic check of a plan against the real graph. Default reply: a compact summary (counts per section and\nper check, the top `max_items` missing items, failed requirements, middleware gaps, forbidden paths, open findings,\nverify counts); details=true gives the full report (every item with file:line evidence and call chains, up to\nmax_items per list).\nplan mode: 1 RESOLVE (references, route middleware requirements, middleware differences between entry routes of\nthe same modified code), 2 MISSING FROM PLAN (writers/readers of changed tables, Filament/API resources, $fillable,\nform requests, entry points + callers of modified methods, frontend pages and external client snapshots calling\naffected routes, parallel/legacy mirrors, precedents), 3 CONFLICTS (forbidden paths still in the code with their\ncall chain, open findings touching the same nodes, linked or not), plus entry call chains.\nverify=true (after implementation + re-index): also 4 VERIFY: planned nodes/edges exist now (with evidence),\nmodified targets changed vs baseline, forbidden paths gone or guarded, requirements met.","inputSchema":{"properties":{"details":{"default":false,"title":"Details","type":"boolean"},"max_chars":{"default":30000,"title":"Max Chars","type":"integer"},"max_items":{"default":5,"title":"Max Items","type":"integer"},"name":{"title":"Name","type":"string"},"review":{"default":true,"title":"Review","type":"boolean"},"verify":{"default":false,"title":"Verify","type":"boolean"}},"required":["name"],"title":"plan_checkArguments","type":"object"},"name":"plan_check","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Fingerprint (sha1 of source lines) every modified target of a plan before implementing it, so\nplan_check(verify=true) can report changed/UNCHANGED. Writes plans/<name>.baseline.json (only file it writes).","inputSchema":{"properties":{"name":{"title":"Name","type":"string"}},"required":["name"],"title":"plan_baselineArguments","type":"object"},"name":"plan_baseline","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use after editing so later answers see the change. Re-index (static analysis only: never boots the app or touches a database).\nOn a combined graph (any number of repos): with no arguments every repo is re-indexed from its recorded root and the\ncross-repo link is rebuilt; repo (a name used at link time) re-indexes just that repo; root is matched to the\nrecorded repo roots (a repo directory, a path inside one, or a parent of several). A root that matches no repo, or\na result with 0 nodes, is refused and the graph is left unchanged.\nOn a single-repo graph root defaults to the indexed root; gates is a gate-scenario JSON path (defaults to the\nserver's --gates). The project config file (.cg.yaml at the root) is read on every\nre-index; Python source roots given with `cg index --python-root` and `--include-generated` are kept.\nGenerated, copied and vendored files stay out of the graph (the coverage tool lists them) unless the graph was\nindexed with --include-generated or .cg.yaml sets generated.include.","inputSchema":{"properties":{"gates":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Gates"},"repo":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Repo"},"root":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Root"}},"title":"indexArguments","type":"object"},"name":"index","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}},{"description":"Use when unsure which graph a question belongs to. Lists the graphs this server can query: name, repo roots, languages, indexed commit and freshness.\nOne `cg-mcp` process serves every registered graph. Pass `graph` to other tools to choose one, or omit it\nand the server resolves from a path in the call, then MCP roots or the working directory, then the configured\ndefault. An ambiguous choice returns the list instead of guessing.","inputSchema":{"properties":{},"title":"graphsArguments","type":"object"},"name":"graphs","outputSchema":{"description":"Structured content of every tool reply: the text reply plus machine-readable completeness.","properties":{"completeness":{"additionalProperties":true,"title":"Completeness","type":"object"},"overrides":{"additionalProperties":true,"title":"Overrides","type":"object"},"platform":{"additionalProperties":true,"title":"Platform","type":"object"},"result":{"title":"Result","type":"string"},"stale":{"title":"Stale","type":"boolean"}},"required":["result","completeness"],"title":"ToolReply","type":"object"}}]}}}
