MCP tools reference
Every tool of the RAGRAF stdio server: how it maps to a facade operation, the "read-only / changes state" hints, required parameters and the differences from the CLI.
Updated: 2026-11-10
What the MCP server in RAGRAF is #
There are 94 tools. The server is a stdio process that your agent launches; no network is used and no port is opened. The tool name as the client sees it is ragraf_<operation>. The rule has meaningful exceptions, and they are listed below rather than hidden.
The readOnlyHint / destructiveHint hints come from the tool metadata (_TOOL_META in src/ragraf/mcp_server.py): the client shows them to a human before the call and may require confirmation. A hint is not a permission — it describes behaviour.
What a call looks like #
Tools are called as functions with named arguments; the server hands the parameters and their schemas to the client itself, so the hints in the interface never diverge from the code:
ragraf_ensure(project="<project directory>")
ragraf_search(query="where the licence is issued", limit=5)
ragraf_callers(fqn="Site\\Support\\Locale::htmlLang")Tool → operation #
| Tool | Facade operation | Hint | Required parameters |
|---|---|---|---|
ragraf_attest_bundle | attest_bundle | changes state | — |
ragraf_broker_issue | broker_issue | changes state | secret |
ragraf_broker_rotate | broker_rotate | changes state (destructive) | — |
ragraf_callees | callees | read-only | fqn |
ragraf_callers | callers | read-only | fqn |
ragraf_catalog | catalog | read-only | — |
ragraf_class_usage | class_usage | read-only | — |
ragraf_code | code | read-only | — |
ragraf_compact | compact | changes state (destructive) | — |
ragraf_context | — (own tool) | read-only | — |
ragraf_contract_diff | contract_diff | read-only | before, after |
ragraf_contract_drift | contract_drift | read-only | — |
ragraf_contract_pin_approve | contract_pin_approve | changes state | — |
ragraf_contract_pin_history | contract_pin_history | read-only | — |
ragraf_contract_pin_sample | contract_pin_sample | changes state | — |
ragraf_contract_pin_status | contract_pin_status | read-only | — |
ragraf_db_cross | db_cross | read-only | — |
ragraf_db_drift | db_drift | read-only | — |
ragraf_db_relations | db_relations | read-only | table |
ragraf_db_sample | db_sample | read-only | table |
ragraf_db_schema | db_schema | read-only | — |
ragraf_db_table | db_table | read-only | table |
ragraf_dead_code | dead_code | read-only | — |
ragraf_dependents | dependents | read-only | — |
ragraf_diff | diff | read-only | — |
ragraf_doc_asof | doc_asof | read-only | query, date |
ragraf_doc_get | doc_get | read-only | locator |
ragraf_doc_ocr | doc_ocr | read-only | — |
ragraf_doc_relations | doc_relations | read-only | — |
ragraf_doc_search | doc_search | read-only | query |
ragraf_doc_search_levels | doc_search_levels | read-only | query |
ragraf_doc_status | doc_status | read-only | — |
ragraf_doc_validate | doc_validate | read-only | — |
ragraf_drift_ack | drift_ack | changes state | entry_ids |
ragraf_drift_report | drift_report | read-only | — |
ragraf_duplicates | duplicates | read-only | — |
ragraf_edge_evidence | edge_evidence | read-only | fqn |
ragraf_ensure | — (own tool) | changes state | — |
ragraf_entity_neighbors | entity_neighbors | read-only | entity |
ragraf_entrypoints | entrypoints | read-only | — |
ragraf_excludes | excludes | changes state | — |
ragraf_fact_store | fact_store | changes state | subject, predicate, value |
ragraf_fact_recall | fact_recall | read-only | — |
ragraf_fact_replace | fact_replace | changes state | fact_id, value |
ragraf_fact_forget | fact_forget | changes state (destructive) | fact_id |
ragraf_fact_history | fact_history | read-only | fact_id |
ragraf_freshness | freshness | changes state | — |
ragraf_global_overview | global_overview | read-only | — |
ragraf_impact | impact | read-only | target |
ragraf_index_status | index_status | read-only | — |
ragraf_license_offline | license_offline | changes state | — |
ragraf_live_read | live_read | read-only | path |
ragraf_neighbors | neighbors | read-only | — |
ragraf_note | note | changes state | text |
ragraf_notes | notes | read-only | — |
ragraf_policy_trace | policy_trace | read-only | symbol |
ragraf_preflight | preflight | read-only | — |
ragraf_quality_diff | quality_diff | read-only | — |
ragraf_quality_pair | quality_pair | read-only | — |
ragraf_quality_prune | quality_prune | changes state (destructive) | — |
ragraf_quality_suite | quality_suite | changes state | — |
ragraf_quality_trace | quality_trace | changes state | — |
ragraf_references | references | read-only | fqn |
ragraf_repo_map | repo_map | read-only | — |
ragraf_route | route | read-only | query |
ragraf_routes | routes | read-only | — |
ragraf_schema | schema | read-only | — |
ragraf_search | search | read-only | query |
ragraf_search_multi | search_multi | read-only | queries |
ragraf_secret_delete | — (own tool) | changes state (destructive) | name |
ragraf_secret_grant | — (own tool) | changes state | name |
ragraf_secret_list | — (own tool) | read-only | — |
ragraf_secret_policy | — (own tool) | read-only | — |
ragraf_secret_reveal | — (own tool) | read-only | name |
ragraf_secret_revoke | — (own tool) | changes state | name, agents |
ragraf_secret_set | — (own tool) | changes state | name, value |
ragraf_secret_show | — (own tool) | read-only | name |
ragraf_siem_export | siem_export | changes state | — |
ragraf_siem_test | siem_test | changes state | — |
ragraf_skill_catalog | skill_catalog | read-only | — |
ragraf_skill_load | skill_load | read-only | name |
ragraf_skill_reference | skill_reference | read-only | name, file |
ragraf_slice | slice | read-only | fqn |
ragraf_sso_login | sso_login | changes state | — |
ragraf_sso_map_roles | sso_map_roles | read-only | — |
ragraf_stale_cascade | stale_cascade | changes state | — |
ragraf_symbol | symbol | read-only | name |
ragraf_table_usage | table_usage | read-only | table |
ragraf_task | — (own tool) | changes state | — |
ragraf_task_stats | task_stats | read-only | — |
ragraf_themes | themes | read-only | — |
ragraf_usage | — (own tool) | read-only | — |
ragraf_use_project | — (own tool) | changes state | project |
ragraf_write_check | write_check | read-only | table |
Tools without a facade operation #
There are 13 of them — each has its own job, and they are not "extra" names:
| Tool | What it is for |
|---|---|
ragraf_ensure | find the corpus by project directory, bring it up to date or create it — the first call of any session |
ragraf_use_project | select the corpus explicitly when a session has more than one |
ragraf_context | show which corpus is selected and on what grounds (works with no selection as well) |
ragraf_task | name the task so that calls are attributed to it in the statistics |
ragraf_usage | call statistics and an estimate of the effect of adoption |
ragraf_secret_list | the secret vault: what is stored, without values |
ragraf_secret_show | metadata of a single record |
ragraf_secret_reveal | hand the value to an agent with a reason and an audit entry |
ragraf_secret_set | store a secret (one that was encountered, or a new one) |
ragraf_secret_policy | agent rights to write to the vault |
ragraf_secret_grant | grant the right to a specific agent |
ragraf_secret_revoke | revoke the right |
ragraf_secret_delete | delete the record (the history stays in the audit) |
Operations without an MCP tool #
There are 6: calibrate, gate, shared_index_publish, shared_index_query, shared_index_status, task_set. The reason is the same in every case — these are actions of the contour administrator (building the check suite, publishing the shared index, labelling a task from the console) that a human performs with a CLI command. The agent deliberately cannot reach them: silently publishing the shared index or rebuilding the check suite from an agent session would be a change to the contour made without a human decision.
How MCP differs from the CLI #
| Property | CLI | MCP |
|---|---|---|
| Who calls | a human or a script | an agent from a session |
| Transport | a process, arguments, stdout | JSON-RPC over stdio |
| Response | JSON on stdout (--json) or text | a structured tool result |
| Corpus selection | -p <config> | ragraf_use_project / ragraf_ensure |
| Error | exit code and refusal text | a refusal with kind and next_action |
To check that the agent can see the tools, ask for ragraf_ensure, then ragraf_search. If the tools are absent, see the "Connecting an agent" section: most often the cause is the path to the interpreter, or the server is declared but the client has not been restarted.