Skip to main content
Glama
fmangot

Sequential Thinking MVP Server

by fmangot

get_thought_sequence

Retrieve complete step-by-step reasoning sequences for complex problem solving, allowing review of structured thought processes and alternative reasoning paths.

Instructions

Retrieves the complete sequence of thoughts for the current or specified session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdNoOptional session ID to retrieve (defaults to current session)

Implementation Reference

  • The main handler function for the 'get_thought_sequence' tool. It extracts the sessionId from arguments, calls thinkingManager.getSequence(sessionId), formats the result with session info and thought count as JSON, and returns it in the MCP content format.
    case 'get_thought_sequence': {
      const { sessionId } = args as { sessionId?: string };
      const sequence = thinkingManager.getSequence(sessionId);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              {
                sessionId: sessionId || thinkingManager.getCurrentSessionId(),
                thoughtCount: sequence.length,
                thoughts: sequence,
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • The tool schema definition for 'get_thought_sequence', specifying the name, description, and input schema with optional sessionId.
    export const GET_SEQUENCE_TOOL: Tool = {
      name: 'get_thought_sequence',
      description: 'Retrieves the complete sequence of thoughts for the current or specified session',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId: {
            type: 'string',
            description: 'Optional session ID to retrieve (defaults to current session)',
          },
        },
      },
    };
  • Registration of the tool call handler in the HTTP MCP server, which routes calls to handleToolCall including 'get_thought_sequence'.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      return handleToolCall(request.params, manager);
    });
  • Registration for listing tools in HTTP server; ALL_TOOLS includes the 'get_thought_sequence' schema.
    const server = new Server(
      {
        name: 'sequential-thinking-mvp-server',
  • Core helper method in SequentialThinkingManager that retrieves the thought sequence for a given session ID, used by the tool handler.
    public getSequence(sessionId?: string): StoredThought[] {
      const sid = sessionId || this.currentSessionId;
      const session = this.sessions.get(sid);
      return session ? session.thoughts : [];
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data, implying a read-only operation, but doesn't cover aspects like authentication needs, rate limits, error handling, or what 'complete sequence' entails (e.g., format, pagination). This leaves significant gaps for a tool with potential complexity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core functionality without unnecessary words. It is front-loaded with the main action and resource, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a retrieval tool. It doesn't explain what the output looks like (e.g., structure of the thought sequence), potential side effects, or how it interacts with sibling tools, leaving the agent with insufficient context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'sessionId' well-documented in the schema. The description adds minimal value beyond this, only implying the parameter's optional nature ('current or specified session'), which is already covered in the schema's description. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('retrieves') and resource ('complete sequence of thoughts'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_session_summary' or 'get_thought_branch', which likely retrieve related but different data, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or contexts where this retrieval is preferred over others, leaving the agent with no explicit usage instructions beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fmangot/Mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server