omnigraph/crates
Ragnor Comerford 36c3a16dba
Refuse duplicate MCP tool names across exposed stored queries
The effective MCP tool name (explicit tool_name, else the query name) is a
second identity namespace beside the registry key, but nothing enforced it
unique — two exposed queries could claim one catalog key, and each consumer
re-derived the name ad hoc.

Add StoredQuery::effective_tool_name() as the one definition, and a
load-time uniqueness pass in from_specs over exposed queries: a collision is
a collected LoadError naming the loser and the winner. Scoped to exposed
queries (unexposed have no MCP tool); deterministic over the BTreeMap so the
first-declared wins and the error order is stable.

New (rare) refusal: a config with colliding exposed tool names now fails
`omnigraph queries validate` offline and refuses server boot, the same
posture as a malformed registry. Release-note-worthy.

Test-first: duplicate_exposed_tool_name_is_a_load_error (red before the
pass, green after) + a CLI offline test; the unexposed sibling pins the
exposed-only scope; effective_tool_name asserts folded into the load test.
2026-05-30 22:05:18 +02:00
..
omnigraph (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00
omnigraph-cli Refuse duplicate MCP tool names across exposed stored queries 2026-05-30 22:05:18 +02:00
omnigraph-compiler (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00
omnigraph-policy Add InvokeQuery Cedar action (coarse, graph-scoped) 2026-05-30 20:20:03 +02:00
omnigraph-server Refuse duplicate MCP tool names across exposed stored queries 2026-05-30 22:05:18 +02:00