Skip to content

Latest commit

 

History

History
223 lines (160 loc) · 7.53 KB

mcp.md

File metadata and controls

223 lines (160 loc) · 7.53 KB

MCP reference

cg mcp serves 15 tools over stdio. None of them edits or runs project code: cg_index writes only the graph cache, cg_read reads lines inside the project and every other tool runs the CLI command named in its section. The project is the one the server was started for; clients never choose the root or the command. Setup for Codex and Claude Code is in Agents and MCP.

Tool What it answers
cg_index Index source files without executing them; writes only the graph cache.
cg_find Find indexed symbols by name or wildcard.
cg_search Retrieve bounded code evidence using local FTS5/BM25 and optional graph RRF; no model calls.
cg_locate Start here: from the text of a request or issue to the places to change, with their source, callers and tests, in one bounded answer; no model calls.
cg_show Show an indexed symbol, signature and neighbours.
cg_callers Show callers and confidence; static evidence, not runtime proof.
cg_callees Show callees and unresolved calls.
cg_impact Find affected callers and candidate tests.
cg_verify_plan Propose relevant tests and argv from static runner evidence; never run them.
cg_prepare Prepare bounded evidence for a feature or symbol.
cg_flows Read the functional map: declared purposes linked to code with source witnesses; technical candidates are separate. Use cg_prepare on a declared ID for impact and tests.
cg_source Read a bounded source window inside the indexed project.
cg_review Inspect a diff and baseline; does not save baselines or execute tests.
cg_check Report static candidates; not a compiler or test run.
cg_read Read numbered file lines inside the project without executing code.

cg_index

Index source files without executing them; writes only the graph cache.

Runs cg index.

Parameter Type Required Default Limits
full boolean false

cg_find

Find indexed symbols by name or wildcard.

Runs cg find.

Parameter Type Required Default Limits
pattern string yes
kind string
limit integer 40 min 1

cg_search

Retrieve bounded code evidence using local FTS5/BM25 and optional graph RRF; no model calls.

Runs cg search.

Parameter Type Required Default Limits
query string yes min length 1; max length 512
mode string hybrid hybrid, lexical
limit integer 10 min 1; max 50
depth integer 2 min 1; max 3
min_conf string medium high, medium, low
max_chars integer 9000 min 64; max 16000
json boolean true

cg_locate

Start here: from the text of a request or issue to the places to change, with their source, callers and tests, in one bounded answer; no model calls.

Runs cg locate.

Parameter Type Required Default Limits
text string yes min length 1; max length 200000
limit integer 5 min 1; max 10
max_chars integer 5000 min 512; max 16000
min_conf string medium high, medium, low
json boolean true

cg_show

Show an indexed symbol, signature and neighbours.

Runs cg show.

Parameter Type Required Default Limits
symbol string yes

cg_callers

Show callers and confidence; static evidence, not runtime proof.

Runs cg callers.

Parameter Type Required Default Limits
symbol string yes
min_conf string low high, medium, low

cg_callees

Show callees and unresolved calls.

Runs cg callees.

Parameter Type Required Default Limits
symbol string yes
min_conf string low high, medium, low

cg_impact

Find affected callers and candidate tests.

Runs cg impact.

Parameter Type Required Default Limits
target string yes
file boolean false
depth integer 3 min 1; max 5
min_conf string medium high, medium, low
limit integer 40 min 1
json boolean true

cg_verify_plan

Propose relevant tests and argv from static runner evidence; never run them.

Runs cg verify.

Parameter Type Required Default Limits
target string yes
file boolean false
plan boolean true
min_conf string medium high, medium, low
depth integer 3 min 1; max 5
json boolean true

cg_prepare

Prepare bounded evidence for a feature or symbol.

Runs cg prepare.

Parameter Type Required Default Limits
feature string
symbol string
verify_symbol array of string [] at most 8 items
intent string ``
max_chars integer 12000 min 1
min_conf string medium high, medium, low
depth integer 2 min 1; max 3
json boolean true

cg_flows

Read the functional map: declared purposes linked to code with source witnesses; technical candidates are separate. Use cg_prepare on a declared ID for impact and tests.

Runs cg flows.

Parameter Type Required Default Limits
query string `` max length 200
limit integer 25 min 1; max 100
min_conf string medium high, medium, low
max_chars integer 12000 min 512; max 16000
json boolean true

cg_source

Read a bounded source window inside the indexed project.

Runs cg source.

Parameter Type Required Default Limits
path string yes
line integer 1 min 1
column integer 0 min 0
max_chars integer 1200 min 1
json boolean true

cg_review

Inspect a diff and baseline; does not save baselines or execute tests.

Runs cg review.

Parameter Type Required Default Limits
base string
staged boolean false
baseline string
max_chars integer 20000 min 1
min_conf string medium high, medium, low
depth integer 3 min 1; max 5
summary boolean false
json boolean true

cg_check

Report static candidates; not a compiler or test run.

Runs cg check.

Parameter Type Required Default Limits
limit integer 60 min 1
json boolean true
include_diagnostics boolean false

cg_read

Read numbered file lines inside the project without executing code.

Reads numbered lines directly; there is no CLI command.

Parameter Type Required Default Limits
path string yes
start_line integer 1 min 1
end_line integer or null min 1