mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-21 02:28:07 +02:00
docs(mcp): document the MCP surface, authoring controls, and skill (v0.8.0)
Document the per-graph MCP surface (POST /graphs/{id}/mcp, shipped in the
preceding commits and landing under v0.8.0) and the `.gq` authoring controls
that shape stored-query tools.
- New docs/user/operations/mcp.md: the client-facing guide — transport, tool
catalog (built-ins + stored queries), projection modes, structured output,
authorization (call-authoritative + list-relaxation), Host/Origin policy, the
protocol-version contract.
- docs/user/operations/server.md: the /mcp endpoint + an "MCP surface" section;
docs/user/index.md: a "Connect an MCP agent" pointer.
- docs/user/queries/index.md: an Annotations section — query @description /
@instruction / @mcp(expose, tool_name) and per-parameter @description.
- AGENTS.md: topic-table row + MCP note on the HTTP-server capability row.
- docs/dev/testing.md: the omnigraph-mcp crate + server tests/mcp.rs.
- docs/dev/rfc-005 §D5: retire the "cluster = everything exposed" bridge —
cluster mode honors source `@mcp(expose: …)`; presentation vs authorization
split made explicit.
- skills/omnigraph: server-policy.md MCP section; stored-queries.md corrected
(per-query controls now ship via @mcp, not "planned"); SKILL.md MCP triggers,
Deep Dives row, version → 0.8.0.
- docs/releases/v0.8.0.md: the MCP surface + authoring-controls release notes.
Crate version manifests are deliberately NOT bumped — that is the v0.8.0
release-cut step; this lands on the feature branch.
This commit is contained in:
parent
c8e91c11f0
commit
c06343362a
11 changed files with 349 additions and 13 deletions
|
|
@ -3,8 +3,8 @@
|
|||
## Query declarations
|
||||
|
||||
```
|
||||
query <name>($p1: T1, $p2: T2?, …)
|
||||
@description("…") @instruction("…") {
|
||||
query <name>(@description("…") $p1: T1, $p2: T2?, …)
|
||||
@description("…") @instruction("…") @mcp(tool_name: "…", expose: true) {
|
||||
…
|
||||
}
|
||||
```
|
||||
|
|
@ -19,6 +19,31 @@ Multi-modal search functions (`nearest`, `bm25`, `rrf`, …) used inside `match`
|
|||
|
||||
Param types reuse all schema scalars; trailing `?` makes a param optional. The compiler reserves `$__nanograph_now` for `now()`.
|
||||
|
||||
### Annotations
|
||||
|
||||
Annotations after the param list are optional and order-independent:
|
||||
|
||||
- `@description("…")` — human-readable summary of the query (shown in the
|
||||
stored-query catalog and as the MCP tool description).
|
||||
- `@instruction("…")` — agent-facing *how/when to use* guidance. It is folded
|
||||
into the [MCP](../operations/mcp.md) tool description (appended after
|
||||
`@description`), so an agent reading `tools/list` sees it.
|
||||
- `@mcp(...)` — **MCP-presentation** controls for when the query is served as an
|
||||
agent tool (see [mcp.md](../operations/mcp.md)). Both keys are optional:
|
||||
- `tool_name: "<name>"` — the tool id to expose the query under (default: the
|
||||
query name). Must be unique across exposed queries and must not shadow a
|
||||
built-in tool, or the server refuses to boot.
|
||||
- `expose: <bool>` — whether the query appears on the agent tool surface
|
||||
(default `true`). `expose: false` keeps the query HTTP/service-callable by
|
||||
name but hides it from `tools/list` and the catalog. This is **presentation
|
||||
only** — not an authorization control (Cedar `invoke_query` governs who may
|
||||
call it).
|
||||
|
||||
A **per-parameter** `@description("…")` (written before the variable, e.g.
|
||||
`@description("the user's slug") $slug: String`) documents that argument; it is
|
||||
surfaced into the parameter's JSON-Schema `description` in the catalog and the
|
||||
MCP tool input schema.
|
||||
|
||||
## MATCH clauses
|
||||
|
||||
- **Binding**: `$x: NodeType { prop: <literal | $param | now()>, … }`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue