Skip to main content
Glama
ThinkFar

Clear Thought Server

visualreasoning

Create and manipulate diagrams to solve problems, generate insights, and test hypotheses through visual thinking and structured reasoning.

Instructions

A tool for visual thinking, problem-solving, and communication. This tool enables models to create, manipulate, and interpret diagrams, graphs, and other visual representations. It supports various visual elements and operations to facilitate insight generation and hypothesis testing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYes
elementsNo
transformationTypeNo
diagramIdYes
diagramTypeYes
iterationYes
observationNo
insightNo
hypothesisNo
nextOperationNeededYes

Implementation Reference

  • Main handler function that validates input, processes visual reasoning data, formats and logs output, and returns structured JSON content or error.
    public processVisualReasoning(input: unknown): { content: Array<{ type: string; text: string }>; isError?: boolean } {
      try {
        const validatedData = this.validateInputData(input);
        const processedData: VisualOperationData = {
          ...validatedData,
          elements: validatedData.elements || []
        };
        
        const formattedOutput = this.formatOutput(processedData);
        console.error(formattedOutput);
    
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              operation: processedData.operation,
              diagramId: processedData.diagramId,
              diagramType: processedData.diagramType,
              iteration: processedData.iteration,
              nextOperationNeeded: processedData.nextOperationNeeded,
              elementCount: processedData.elements ? processedData.elements.length : 0,
              status: 'success'
            }, null, 2)
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              error: error instanceof Error ? error.message : String(error),
              status: 'failed'
            }, null, 2)
          }],
          isError: true
        };
      }
    }
  • Tool definition including name, description, and detailed inputSchema for validating visualreasoning tool inputs.
    const VISUAL_REASONING_TOOL: Tool = {
        name: "visualreasoning",
        description: `A tool for visual thinking, problem-solving, and communication.
    This tool enables models to create, manipulate, and interpret diagrams, graphs, and other visual representations.
    It supports various visual elements and operations to facilitate insight generation and hypothesis testing.`,
        inputSchema: {
            type: "object",
            properties: {
                operation: {
                    type: "string",
                    enum: ["create", "update", "delete", "transform", "observe"],
                },
                elements: {
                    type: "array",
                    items: {
                        type: "object",
                        properties: {
                            id: { type: "string" },
                            type: {
                                type: "string",
                                enum: ["node", "edge", "container", "annotation"],
                            },
                            label: { type: "string" },
                            properties: {
                                type: "object",
                                additionalProperties: true,
                            },
                            source: { type: "string" },
                            target: { type: "string" },
                            contains: { type: "array", items: { type: "string" } },
                        },
                        required: ["id", "type", "properties"],
                    },
                },
                transformationType: {
                    type: "string",
                    enum: ["rotate", "move", "resize", "recolor", "regroup"],
                },
                diagramId: { type: "string" },
                diagramType: {
                    type: "string",
                    enum: [
                        "graph",
                        "flowchart",
                        "stateDiagram",
                        "conceptMap",
                        "treeDiagram",
                        "custom",
                    ],
                },
                iteration: { type: "number", minimum: 0 },
                observation: { type: "string" },
                insight: { type: "string" },
                hypothesis: { type: "string" },
                nextOperationNeeded: { type: "boolean" },
            },
            required: [
                "operation",
                "diagramId",
                "diagramType",
                "iteration",
                "nextOperationNeeded",
            ],
        },
    };
  • src/index.ts:990-1012 (registration)
    Registers the visualreasoning tool (line 1008) in the MCP server capabilities alongside other tools.
    const server = new Server(
        {
            name: "clear-thought-mcp-server",
            version: "1.1.2",
        },
        {
            capabilities: {
                tools: {
                    sequentialthinking: SEQUENTIAL_THINKING_TOOL,
                    mentalmodel: MENTAL_MODEL_TOOL,
                    designpattern: DESIGN_PATTERN_TOOL,
                    programmingparadigm: PROGRAMMING_PARADIGM_TOOL,
                    debuggingapproach: DEBUGGING_APPROACH_TOOL,
                    collaborativereasoning: COLLABORATIVE_REASONING_TOOL,
                    decisionframework: DECISION_FRAMEWORK_TOOL,
                    metacognitivemonitoring: METACOGNITIVE_MONITORING_TOOL,
                    scientificmethod: SCIENTIFIC_METHOD_TOOL,
                    structuredargumentation: STRUCTURED_ARGUMENTATION_TOOL,
                    visualreasoning: VISUAL_REASONING_TOOL,
                },
            },
        }
    );
  • src/index.ts:1164-1176 (registration)
    Dispatch handler in CallToolRequestSchema switch that routes visualreasoning calls to the VisualReasoningServer.processVisualReasoning method.
    case "visualreasoning": {
        const result = visualReasoningServer.processVisualReasoning(
            request.params.arguments
        );
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(result, null, 2),
                },
            ],
        };
    }
  • Helper method to validate the input data against VisualOperationData requirements.
    private validateInputData(input: unknown): VisualOperationData {
      const data = input as VisualOperationData;
      if (!data.operation || !data.diagramId || !data.diagramType) {
        throw new Error("Invalid input for VisualReasoning: Missing required fields.");
      }
      if (typeof data.iteration !== 'number' || data.iteration < 0) {
        throw new Error("Invalid iteration value for VisualOperationData.");
      }
      if (typeof data.nextOperationNeeded !== 'boolean') {
        throw new Error("Invalid nextOperationNeeded value for VisualOperationData.");
      }
      return data;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'create, manipulate, and interpret' operations and 'facilitate insight generation and hypothesis testing,' but doesn't specify what happens during these operations—whether they're read-only, destructive, require specific permissions, have side effects, or produce outputs. For a tool with 10 parameters including operations like 'delete' and 'transform,' this lack of behavioral detail is a significant gap.

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

Conciseness4/5

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

The description is appropriately concise with three sentences that avoid redundancy. It's front-loaded with the core purpose ('A tool for visual thinking, problem-solving, and communication'), followed by capabilities and benefits. There's no wasted text, though the abstract nature limits its utility. The structure is clear but could be more actionable.

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 tool's complexity (10 parameters, 5 required, multiple enums) and the absence of both annotations and an output schema, the description is inadequate. It doesn't explain what the tool returns, how errors are handled, or the scope of operations. For a multi-functional tool with parameters like 'observation' and 'hypothesis,' more context is needed to understand its complete behavior and outputs.

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

Parameters2/5

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

Schema description coverage is 0%, meaning none of the 10 parameters have descriptions in the schema. The tool description doesn't explain any parameters—it doesn't mention 'operation,' 'elements,' 'diagramId,' or other key inputs. While it implies operations like 'create' and 'manipulate,' it doesn't map these to specific parameters or provide usage examples. The description fails to compensate for the complete lack of schema documentation.

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

Purpose2/5

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

The description states the tool is for 'visual thinking, problem-solving, and communication' and enables 'create, manipulate, and interpret diagrams, graphs, and other visual representations.' This is vague and abstract rather than specific about what the tool actually does. It doesn't clearly distinguish from sibling tools like 'designpattern' or 'mentalmodel' that might also involve visual elements. The purpose is described at a conceptual level rather than as a concrete operation.

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

Usage Guidelines1/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 any specific contexts, prerequisites, or exclusions. Given the sibling tools include various reasoning approaches (e.g., 'collaborativereasoning', 'scientificmethod'), there's no indication of when visual reasoning is preferred over other methods. The description is completely silent on usage scenarios.

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/ThinkFar/clear-thought-mcp'

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