Skip to content

[Feature]: MCP server: add tool annotations and server instructions #5208

Open

Description

@bitdruid

Problem or use case

graphify-mcp (0.9.108) sends neither of the two hints MCP has for this:

  • tools/list returns annotations: null for all ten tools - none is marked readOnlyHint, although none of them writes anything.
  • initialize returns no instructions.

Effects in a client:

  1. Client implementations that gate tool calls on readOnlyHint deny or ask for approval on every graph_stats or query_graph.
  2. The model only sees generic descriptions ("Search the knowledge graph using BFS or DFS") and e.g. nothing on when the graph beats grep. Without the CLAUDE.md / AGENTS.md section from graphify <platform> install, agents rarely call the tools. MCP is the one integration that reaches every client - the instruction files only reach the supported platforms.

Proposed solution

1. Tool annotations

Tools readOnlyHint openWorldHint
query_graph, get_node, get_neighbors, get_community, god_nodes, graph_stats, shortest_path true false
list_prs, get_pr_impact, triage_prs (call GitHub through gh) true true

A title per tool helps clients that show one. In serve.py this is one argument per types.Tool(...), the same in mcp 1.x and 2.x:

types.Tool(
    name="query_graph",
    ...,
    annotations=types.ToolAnnotations(title="Query graph", readOnlyHint=True, openWorldHint=False),
)

2. Server instructions

Server(..., instructions=...) in both SDK branches.

Alternatives considered

  • graphify <platform> install writes the usage hints into CLAUDE.md / AGENTS.md - only for supported platforms, and it edits the user's files.
  • Clients can let users mark tools read-only by hand - per client, per user, and silently stale when a tool changes.

Area

Skills or assistant integrations

Are you willing to submit a PR?

Yes, I can work on this

Compatibility / behavior impact

Both fields are optional in the MCP spec; clients that ignore them see no change. Both SDK branches in serve.py (mcp 1.x and 2.x) accept them.

Additional context

No response

Activity

  1. added
    enhancement
    on Nov 13, 2026
  2. github-actions commented on Nov 13, 2026

    @github-actions

    Thanks for opening this issue, @bitdruid. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions