omnigraph/crates/omnigraph-server
Ragnor Comerford 307ad7c8fd
feat(server): MCP stored-query tools + resources (RFC-003 §5.1/§5.3/§5.5)
Stored-query tools: project one MCP tool per `mcp.expose` registry entry from
the same `query_catalog_entry` the GET /queries catalog uses, with params mapped
to JSON Schema (§5.3: bigint/date/blob as strings, vector as a dim-bounded
number array). Listed as a group under the coarse InvokeQuery gate and
double-gated on call (outer InvokeQuery, then the inner Read/Change in
run_query/run_mutate) — the same contract as POST /queries/{name}. A name that
collides with a built-in is skipped (built-ins win).

Resources: omnigraph://schema, omnigraph://branches, and (multi-graph)
omnigraph://graphs, each gated by the same Cedar action as its tool/route
(Read, Read, GraphList). list_resources is Cedar-filtered; read_resource masks a
denied or unknown URI identically. The resources capability is now advertised
(both handlers are backed).

Tests (tests/server.rs, +6): stored query listed + callable, hidden without
invoke_query, double-gated (invoke_query holder lacking read -> isError);
resources list + read (schema/branches), and a denied read masked as unknown.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-09 15:08:18 +02:00
..
examples feat: inline query strings in CLI and HTTP server (#110) 2026-05-29 13:41:54 +02:00
src feat(server): MCP stored-query tools + resources (RFC-003 §5.1/§5.3/§5.5) 2026-06-09 15:08:18 +02:00
tests feat(server): MCP stored-query tools + resources (RFC-003 §5.1/§5.3/§5.5) 2026-06-09 15:08:18 +02:00
Cargo.toml feat(server): MCP built-in tool surface (RFC-003 §5.2) 2026-06-09 14:51:45 +02:00