Skip to main content
Glama
autoexecbatman

Enhanced Architecture MCP

query_local_ai

Query a local AI model through Ollama to get reasoning assistance for architectural prompts, with customizable model and temperature settings.

Instructions

Query local AI model via Ollama for reasoning assistance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesThe reasoning prompt to send to local AI
modelNoModel name (default: architecture-reasoning:latest)architecture-reasoning:latest
temperatureNoTemperature for response (0.1-1.0)

Implementation Reference

  • The core handler function that implements the tool logic by making an HTTP POST request to the local Ollama server (/api/generate) with the provided prompt, model, and temperature, then formats and returns the AI response.
    async queryLocalAI(prompt, model = 'architecture-reasoning:latest', temperature = 0.6) {
      try {
        const response = await fetch(`${this.ollamaUrl}/api/generate`, {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
          },
          body: JSON.stringify({
            model: model,
            prompt: prompt,
            stream: false,
            options: {
              temperature: temperature,
              num_predict: 2048
            }
          }),
        });
    
        if (!response.ok) {
          throw new Error(`Ollama API error: ${response.status}`);
        }
    
        const data = await response.json();
        
        return {
          content: [
            {
              type: 'text',
              text: `Local AI Response (${model}):\n\n${data.response}\n\nTokens: ${data.eval_count || 'N/A'}`
            }
          ]
        };
      } catch (error) {
        throw new Error(`Failed to query local AI: ${error.message}`);
      }
    }
  • Registers the query_local_ai tool in the ListToolsRequestSchema handler, providing name, description, and input schema.
    {
      name: 'query_local_ai',
      description: 'Query local AI model via Ollama for reasoning assistance',
      inputSchema: {
        type: 'object',
        properties: {
          prompt: {
            type: 'string',
            description: 'The reasoning prompt to send to local AI'
          },
          model: {
            type: 'string',
            description: 'Model name (default: architecture-reasoning:latest)',
            default: 'architecture-reasoning:latest'
          },
          temperature: {
            type: 'number',
            description: 'Temperature for response (0.1-1.0)',
            default: 0.6
          }
        },
        required: ['prompt']
      }
    },
  • Input schema definition for the query_local_ai tool, specifying prompt (required), model, and temperature parameters with types and defaults.
    inputSchema: {
      type: 'object',
      properties: {
        prompt: {
          type: 'string',
          description: 'The reasoning prompt to send to local AI'
        },
        model: {
          type: 'string',
          description: 'Model name (default: architecture-reasoning:latest)',
          default: 'architecture-reasoning:latest'
        },
        temperature: {
          type: 'number',
          description: 'Temperature for response (0.1-1.0)',
          default: 0.6
        }
      },
      required: ['prompt']
    }
  • Dispatch handler in the CallToolRequestSchema switch statement that routes query_local_ai calls to the queryLocalAI method.
    case 'query_local_ai':
      return await this.queryLocalAI(args.prompt, args.model, args.temperature);
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 queries a local AI model via Ollama, implying it's a read-only operation that may involve network calls or local processing, but lacks details on permissions, rate limits, error handling, or response format. This is inadequate for a tool with potential complexity in AI interactions.

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, efficient sentence that front-loads the core purpose without unnecessary words. It directly communicates the tool's function and context, making it easy to parse and understand quickly, with no wasted information.

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 complexity of querying AI models and the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., text response, structured data), error conditions, or behavioral traits like latency or resource usage, leaving significant gaps for an AI agent to use it effectively.

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?

Schema description coverage is 100%, so the schema fully documents parameters like 'prompt', 'model', and 'temperature'. The description adds no additional meaning beyond what's in the schema, such as examples or constraints not covered. Baseline 3 is appropriate as the schema handles parameter semantics effectively.

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 action ('Query') and target ('local AI model via Ollama'), with the purpose 'for reasoning assistance' providing specific context. It distinguishes from siblings like 'model_list' or 'hybrid_analysis' by focusing on querying rather than listing or analyzing, though it doesn't explicitly differentiate from 'reasoning_assist' or 'token_efficient_reasoning' which may have overlapping purposes.

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 like 'reasoning_assist' or 'token_efficient_reasoning'. It mentions 'reasoning assistance' but doesn't specify scenarios, prerequisites, or exclusions, leaving the agent with minimal context for tool selection among siblings.

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/autoexecbatman/arch-mcp'

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