sequential-thinking: readOnlyHint and idempotentHint annotations are inaccurate (server is stateful, non-idempotent)
Los mantenedores suelen responder en 1 día
@Jack11111eee ya está trabajando en esto.
Desde el 30/8/2026.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- api
Línea de trabajo
Comienza en src/sequentialthinking/index.ts, en las anotaciones de la herramienta, y luego lee los campos de estado y las mutaciones mencionados en src/sequentialthinking/lib.ts. Confirma que los metadatos coinciden con el comportamiento con estado del servidor y que, cuando el cambio esté completo, las afirmaciones de solo lectura e idempotencia son correctas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
The sequentialthinking tool annotations readOnlyHint: true and idempotentHint: true are inaccurate. The server is stateful and non-idempotent — it maintains per-session thoughtHistory and branches instance state that persists across calls and changes on every invocation.
These annotations were added per #3403's suggestion, but the suggested values were not verified against the server's actual stateful behavior.
Evidence (BETS cycle, 2026-08-30)
Ran a governed Benchmarking/Evaluation/Testing/Standards (BETS) cycle against @modelcontextprotocol/server-sequential-thinking (published npm version, via npx -y). 11 test cases across 4 lanes.
readOnlyHint: true is misleading
The SequentialThinkingServer class (confirmed in src/sequentialthinking/lib.ts on main) holds instance state:
private thoughtHistory: ThoughtData[] = [](line 23-24)private branches: Record<string, ThoughtData[]> = {}(line 25-26)
Each processThought call mutates this state:
this.thoughtHistory.push(input)(line 101) — appends to history on every callthis.branches[input.branchId].push(input)(line 111-112) — appends to branch whenbranchFromThought+branchIdprovided
Observed across 11 calls in one session: thoughtHistoryLength incremented linearly (1, 2, 3, ... 11). The server is not read-only — it accumulates session state with each invocation.
idempotentHint: true is false
A tool is idempotent if repeated calls with the same arguments produce the same result. Calling sequentialthinking twice with identical arguments produces different thoughtHistoryLength values (N, then N+1) and potentially different branches contents. The tool is non-idempotent by definition.
Suggested fix
annotations: {
readOnlyHint: false, // server maintains thoughtHistory and branches state
destructiveHint: false, // accurate — no external side effects
idempotentHint: false, // repeated calls produce different history lengths
openWorldHint: false, // accurate — operates on internal reasoning state
},
Impact
Clients relying on readOnlyHint: true for safety assumptions (e.g., "safe to call in parallel", "no state side effects to roll back") will miss the session-state accumulation. Clients relying on idempotentHint: true for caching/retry (e.g., "safe to retry without checking result") will misbehave — a retried call produces a different history length and may create a duplicate branch entry.
Source confirmed on main
src/sequentialthinking/index.ts lines 201-209 (current main as of 2026-08-30):
annotations: {
readOnlyHint: true, // ← should be false
destructiveHint: false,
idempotentHint: true, // ← should be false
openWorldHint: false,
},
src/sequentialthinking/lib.ts lines 23-26, 101, 111-112 confirm the stateful behavior.
Context
- BETS receipt:
agents/_state/bets/20260830T092705Z_sequential-thinking.json(HUMMBL internal, available on request) - Related: #3403 (added these annotations without verification — the suggestion was accepted as-is)
- Discovered during a governed BETS cycle on the MCP fleet, not via automated scanner
Happy to open a PR if that's preferred.
- Lenguaje dominante
- TypeScript
- Estrellas
- 91.4k
- Forks
- 11.8k
- Merge medio
- 7 h 36 min
- PR fusionados (30 d)
- 126
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/servers
-
filesystem: search_files does not expand non-wildcard excludePatterns like directory_tree doesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
modelcontextprotocol/servers#5216 ·
Los mantenedores suelen responder en 1 día
-
bug v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
modelcontextprotocol/servers#5215 ·
Los mantenedores suelen responder en 1 día
-
documentation server-git server-time v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
modelcontextprotocol/servers#5213 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
documentation v2
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/servers#5212 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation v2
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
modelcontextprotocol/servers#5211 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de modelcontextprotocol/servers
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
endora-commerce/endora-commerce#397 ·
Los mantenedores suelen responder en 1 día
-
level/task
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
wazuh/wazuh-dashboard-plugins#9472 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
xavxyz/bei-shan-lin-shui#57 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
opennextjs/opennextjs-cloudflare#1461 ·
Los mantenedores suelen responder en 1 día