Skip to content

feat(sequential-thinking): add tool annotations#3534

Merged
olaservo merged 1 commit intomodelcontextprotocol:mainfrom
nielskaspers:fix/issue-3403-sequential-thinking-annotations
Mar 15, 2026
Merged

feat(sequential-thinking): add tool annotations#3534
olaservo merged 1 commit intomodelcontextprotocol:mainfrom
nielskaspers:fix/issue-3403-sequential-thinking-annotations

Conversation

@nielskaspers
Copy link
Contributor

Summary

Adds tool annotations to the sequentialthinking tool, matching the pattern established by server-filesystem. This is the last unannotated reference server with a single tool.

Issue

Fixes #3403

Changes

  • Added readOnlyHint: true — pure computation, no state persisted or files written
  • Added destructiveHint: false — no data is modified or deleted
  • Added idempotentHint: true — same input produces same reasoning structure
  • Added openWorldHint: false — no external API calls or network access

Testing

  • Annotations are metadata-only and do not affect tool behavior
  • Existing tests continue to pass
  • Verified annotation format matches server-filesystem's pattern

Add readOnlyHint, destructiveHint, idempotentHint, and openWorldHint
annotations to the sequentialthinking tool, consistent with how
server-filesystem annotates its tools.

The tool is pure computation (readOnly), produces deterministic
structure for the same input (idempotent), and makes no external
calls (not openWorld).

Fixes modelcontextprotocol#3403
Copy link
Member

@olaservo olaservo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, well-scoped addition of tool annotations to the sequential-thinking server. All four annotation values are semantically correct:

  • readOnlyHint: true — the tool doesn't modify any external environment (files, network, DB). The in-process state accumulation (thoughtHistory, branches) is an implementation detail, not an environmental side effect in the MCP sense.
  • openWorldHint: false — no network calls or external interactions.
  • destructiveHint: false / idempotentHint: true — redundant per the MCP spec when readOnlyHint is true, but not harmful. The filesystem server takes the terser approach of omitting these for read-only tools, but being explicit is a valid stylistic choice.

LGTM — thanks for the contribution @nielskaspers!


Reviewed with the assistance of Claude Code (claude-opus-4-6). Annotation semantics verified against the MCP specification and sequential-thinking source code.

@olaservo olaservo merged commit c2ee97e into modelcontextprotocol:main Mar 15, 2026
16 of 19 checks passed
nielskaspers added a commit to nielskaspers/servers that referenced this pull request Mar 15, 2026
…#3534)

feat(sequential-thinking): add tool annotations

Adds MCP ToolAnnotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) to the sequential-thinking tool, bringing it in line with the annotation pattern established by the filesystem server.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants