Skip to main content
Glama

visualreasoning

Create, manipulate, and interpret diagrams to generate insights and test hypotheses for problem-solving and communication.

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

  • The main handler function that executes the visual reasoning process.
    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
        };
      }
    }
  • Validation logic for the tool's input data.
    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?

With no annotations, the description carries full burden but omits critical behavioral details: whether diagrams persist between calls (diagramId suggests statefulness), what the 'observe' operation returns, or how the 'iteration' parameter affects behavior. No mention of error handling or side effects.

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

Conciseness3/5

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

Three sentences of moderate length, reasonably structured from general to specific. However, wastes space on abstract fluff ('facilitate insight generation') without conveying concrete mechanics. Front-loaded with buzzwords rather than actionable guidance.

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

Completeness1/5

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

Severely inadequate for complexity: 10 parameters (5 required), nested element structures, enum constraints, and no output schema. Description completely fails to explain the multi-call workflow implied by 'iteration' and 'nextOperationNeeded', leaving agents guessing about state management and response handling.

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

Parameters1/5

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

Critical failure given 0% schema coverage across 10 parameters. Description vaguely references 'operations' and 'elements' but does not explain specific enum values (e.g., difference between 'transform' and 'update', what 'nextOperationNeeded' signals, or how 'insight'/'hypothesis' parameters function as inputs vs outputs).

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

Purpose3/5

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

States general capabilities (create/manipulate/interpret diagrams) but fails to differentiate from siblings like 'mentalmodel' or 'structuredargumentation'. Uses vague umbrella terms like 'visual thinking' and 'problem-solving' that could apply to multiple sibling tools.

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?

No guidance on when to select this tool versus the 10 reasoning-related siblings. No mention of prerequisites, workflow context, or when visual representation is preferable to textual approaches.

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/chirag127/Clear-Thought-MCP-server'

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