Skip to main content
Glama

consult_architecture

Submit architectural questions to receive expert guidance on system design, scalability, and technical decision-making. Provide optional context for tailored recommendations.

Instructions

Consult GLM-4.6 for expert software architecture guidance, system design patterns, scalability strategies, and technical decision-making. Use this for high-level architectural questions requiring deep technical expertise.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe architectural question or problem requiring expert consultation
contextNoOptional additional context about the system, requirements, or constraints

Implementation Reference

  • Handler that extracts 'query' and 'context' arguments and delegates to glmClient.consultArchitecture().
    case 'consult_architecture': {
      const { query, context } = args as { query: string; context?: string };
      const response = await glmClient.consultArchitecture(query, context);
      return {
        content: [
          {
            type: 'text',
            text: response,
          },
        ],
      };
    }
  • Tool definition with inputSchema requiring 'query' (string) and optional 'context' (string).
    name: 'consult_architecture',
    description: 'Consult GLM-4.6 for expert software architecture guidance, system design patterns, scalability strategies, and technical decision-making. Use this for high-level architectural questions requiring deep technical expertise.',
    inputSchema: {
      type: 'object',
      properties: {
        query: {
          type: 'string',
          description: 'The architectural question or problem requiring expert consultation',
        },
        context: {
          type: 'string',
          description: 'Optional additional context about the system, requirements, or constraints',
        },
      },
      required: ['query'],
    },
  • src/index.ts:24-42 (registration)
    Tool is registered in the 'tools' array (line 24) and listed via ListToolsRequestSchema handler at line 133.
    const tools: Tool[] = [
      {
        name: 'consult_architecture',
        description: 'Consult GLM-4.6 for expert software architecture guidance, system design patterns, scalability strategies, and technical decision-making. Use this for high-level architectural questions requiring deep technical expertise.',
        inputSchema: {
          type: 'object',
          properties: {
            query: {
              type: 'string',
              description: 'The architectural question or problem requiring expert consultation',
            },
            context: {
              type: 'string',
              description: 'Optional additional context about the system, requirements, or constraints',
            },
          },
          required: ['query'],
        },
      },
  • Core helper method in GLMClient that builds the system prompt, constructs the GLM messages, calls the GLM-4.6 chat completions API, and returns the response content.
      async consultArchitecture(query: string, context?: string): Promise<string> {
        const systemPrompt = `You are an elite software architecture consultant specializing in enterprise-grade system design, scalability patterns, security architecture, and technical decision-making. 
    
    Your expertise includes:
    - Distributed systems architecture and microservices design
    - Cloud-native patterns and containerization strategies
    - Database architecture and data modeling
    - API design (REST, GraphQL, gRPC)
    - Security architecture and threat modeling
    - Performance optimization and scalability
    - DevOps and CI/CD pipeline architecture
    - Modern frontend and backend frameworks
    - System integration patterns
    
    Provide concise, actionable architectural guidance with enterprise-grade best practices. Focus on technical accuracy, scalability, maintainability, and security.`;
    
        const messages: GLMMessage[] = [
          { role: 'system', content: systemPrompt },
        ];
    
        if (context) {
          messages.push({
            role: 'user',
            content: `Context:\n${context}\n\nArchitectural Query:\n${query}`,
          });
        } else {
          messages.push({ role: 'user', content: query });
        }
    
        const request: GLMRequest = {
          model: this.model,
          messages,
          temperature: 0.7,
          top_p: 0.9,
          max_tokens: 4096,
          stream: false,
        };
    
        try {
          const response = await this.client.post<GLMResponse>('/chat/completions', request);
          
          if (!response.data.choices || response.data.choices.length === 0) {
            throw new Error('GLM-4.6 returned empty response');
          }
    
          return response.data.choices[0].message.content;
        } catch (error) {
          if (axios.isAxiosError(error)) {
            const status = error.response?.status;
            const message = error.response?.data?.error?.message || error.message;
            throw new Error(`GLM-4.6 API Error (${status}): ${message}`);
          }
          throw error;
        }
      }
Behavior2/5

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

No annotations provided, so description carries full burden. It lacks details about behavioral traits such as response format, limitations, or interaction style beyond generic 'guidance'. This leaves the agent unclear on what to expect.

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?

Two sentences front-loaded with purpose and usage. Every sentence adds value with no redundancy.

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

Completeness3/5

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

For a simple consultation tool with no output schema or annotations, the description covers purpose and usage but omits behavioral details and return format. Adequate but not complete.

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 coverage is 100% with descriptions for both parameters. The tool description does not add any additional meaning beyond the schema, so baseline 3 is appropriate.

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

Purpose5/5

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

The description specifies 'Consult GLM-4.6 for expert software architecture guidance...' with clear verb and resource, and distinguishes from siblings by focusing on high-level architectural questions requiring deep expertise.

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

Usage Guidelines4/5

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

Explicitly states when to use: 'Use this for high-level architectural questions requiring deep technical expertise.' However, it does not mention when not to use or directly contrast with sibling tools.

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/bobvasic/glm-mcp-server'

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