servers icon indicating copy to clipboard operation
servers copied to clipboard

Add tool annotations to server-sequential-thinking (1 tool, 0 annotated)

Open agentward-ai opened this issue 9 months ago • 2 comments

Request: Add tool annotations — @modelcontextprotocol/server-sequential-thinking v0.2.0

Context

We ran an automated scan of this server via live JSON-RPC handshake. This server exposes 1 tool with no annotations. A minimal change — adding annotation hints to a single tool — would make this server fully annotated.

For reference, @modelcontextprotocol/server-filesystem annotates all 14 of its tools. This server has the easiest path to matching that standard.

Current state — 0/1 tools annotated

# Tool readOnlyHint destructiveHint idempotentHint openWorldHint
1 sequentialthinking — — — —

Suggested annotations

# Tool readOnlyHint destructiveHint idempotentHint openWorldHint
1 sequentialthinking true false true false

Suggested code change

server.registerTool(
  "sequentialthinking",
  {
    description: "A detailed tool for dynamic and reflective problem-solving through thoughts.",
    inputSchema: {
      thought: z.string(),
      nextThoughtNeeded: z.boolean(),
      thoughtNumber: z.number().int(),
      totalThoughts: z.number().int(),
      isRevision: z.boolean().optional(),
      revisesThought: z.number().int().optional(),
      branchFromThought: z.number().int().optional(),
      branchId: z.string().optional(),
      needsMoreThoughts: z.boolean().optional(),
    },
    annotations: {
      readOnlyHint: true,
      idempotentHint: true,
      openWorldHint: false,
    },
  },
  handler
);

Rationale

readOnlyHint: true — Pure computation. Takes a thought as input, returns structured reasoning. No state persisted, no files written, no external calls.

idempotentHint: true — Same input produces same reasoning structure. Safe for retries.

openWorldHint: false — No external network calls, no side effects outside the response.

destructiveHint can be omitted (defaults to true per spec, but is meaningless when readOnlyHint: true).

Why it still matters

This server is low-risk in isolation and low-risk in composition. But annotations still serve a purpose:

  • Client optimization — Clients that see readOnlyHint: true can skip confirmation prompts. For a tool that agents call frequently in reasoning loops, removing unnecessary friction improves the user experience.

  • Ecosystem consistency — If the official servers don't annotate even their simplest tools, community server developers won't either. This is the easiest possible annotation to add — one tool, all safe values — and it sets the precedent that annotation is expected, not optional.

Impact

This is a one-object addition to the tool registration. No behavior modification.


Found via automated scan with AgentWard. Enumerated via live JSON-RPC handshake, protocol 2025-11-25.

agentward-ai avatar Feb 25 '26 16:02 agentward-ai

How we found this

This was discovered using AgentWard — an open-source MCP security scanner that enumerates tools via live JSON-RPC handshake and assesses risk levels, data access patterns, and annotation coverage.

Reproduce

pip install agentward

# Create a minimal MCP config
cat > /tmp/mcp_config.json << 'CONFIG'
{
  "mcpServers": {
    "sequential-thinking": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
    }
  }
}
CONFIG

# Scan — enumerates the 1 tool, shows annotation gap
agentward scan /tmp/mcp_config.json

# JSON output for programmatic use
agentward scan /tmp/mcp_config.json --json

This is the simplest annotation request across all 5 issues we've filed — one tool, all safe values, one-object code change. Part of a broader effort to bring annotation coverage across the official MCP servers to match what server-filesystem already provides.

agentward-ai avatar Feb 25 '26 16:02 agentward-ai