Skip to main content
Glama

get_coding_guide

Retrieve coding guidelines, conventions, and best practices to ensure consistent and maintainable code development.

Instructions

guide|rules|convention|guide|rules|convention|standards|best practices - Get coding guide

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesGuide name to retrieve
categoryNoGuide category

Implementation Reference

  • The primary handler function that executes the get_coding_guide tool. It loads coding guides from JSON, finds the specified guide, checks category if provided, and returns formatted content or error.
    export async function getCodingGuide(args: { name: string; category?: string }): Promise<ToolResult> {
      const { name: guideName, category: guideCategory } = args;
      
      try {
        const guide = await findGuide(guideName);
        if (guide) {
          // If category is specified, verify it matches
          if (guideCategory && guide.category !== guideCategory) {
            return {
              content: [{ type: 'text', text: `Guide "${guideName}" found but belongs to category "${guide.category}", not "${guideCategory}".` }]
            };
          }
          return {
            content: [{ type: 'text', text: `Guide: ${guide.name}\nCategory: ${guide.category}\n\n${guide.content}\n\nTags: ${guide.tags.join(', ')} | Updated: ${guide.lastUpdated}` }]
          };
        } else {
          const categoryHint = guideCategory ? ` in category "${guideCategory}"` : '';
          return {
            content: [{ type: 'text', text: `Guide not found: "${guideName}"${categoryHint}. Use list_coding_guides to see available guides.` }]
          };
        }
      } catch (error) {
        return {
          content: [{ type: 'text', text: `Error retrieving guide: ${error instanceof Error ? error.message : 'Unknown error'}` }]
        };
      }
    }
  • The ToolDefinition object defining the tool's name, description, input schema (name required, category optional), and annotations.
    export const getCodingGuideDefinition: ToolDefinition = {
      name: 'get_coding_guide',
      description: 'guide|rules|convention|guide|rules|convention|standards|best practices - Get coding guide',
      inputSchema: {
        type: 'object',
        properties: {
          name: { type: 'string', description: 'Guide name to retrieve' },
          category: { type: 'string', description: 'Guide category' }
        },
        required: ['name']
      },
      annotations: {
        title: 'Get Coding Guide',
        audience: ['user', 'assistant']
      }
    };
  • src/index.ts:104-160 (registration)
    Registration of the tool definition in the main tools array, used by the ListTools handler to expose the tool via MCP protocol.
    const tools: ToolDefinition[] = [
      // Time Utility Tools
      getCurrentTimeDefinition,
    
      // Semantic Code Analysis Tools (Serena-inspired)
      findSymbolDefinition,
      findReferencesDefinition,
    
      // Sequential Thinking Tools
      createThinkingChainDefinition,
      analyzeProblemDefinition,
      stepByStepAnalysisDefinition,
      breakDownProblemDefinition,
      thinkAloudProcessDefinition,
      formatAsPlanDefinition,
    
      // Browser Development Tools
      monitorConsoleLogsDefinition,
      inspectNetworkRequestsDefinition,
    
      // Memory Management Tools
      saveMemoryDefinition,
      recallMemoryDefinition,
      listMemoriesDefinition,
      deleteMemoryDefinition,
      searchMemoriesDefinition,
      updateMemoryDefinition,
      autoSaveContextDefinition,
      restoreSessionContextDefinition,
      prioritizeMemoryDefinition,
      startSessionDefinition,
    
      // Convention Tools
      getCodingGuideDefinition,
      applyQualityRulesDefinition,
      validateCodeQualityDefinition,
      analyzeComplexityDefinition,
      checkCouplingCohesionDefinition,
      suggestImprovementsDefinition,
    
      // Planning Tools
      generatePrdDefinition,
      createUserStoriesDefinition,
      analyzeRequirementsDefinition,
      featureRoadmapDefinition,
    
      // Prompt Enhancement Tools
      enhancePromptDefinition,
      analyzePromptDefinition,
      enhancePromptGeminiDefinition,
    
      // Reasoning Tools
      applyReasoningFrameworkDefinition,
    
      // UI Preview Tools
      previewUiAsciiDefinition
    ];
  • src/index.ts:658-659 (registration)
    Dispatch registration in the executeToolCall switch statement, which routes CallTool requests to the getCodingGuide handler.
    case 'get_coding_guide':
      return await getCodingGuide(args as any) as CallToolResult;
  • src/index.ts:56-56 (registration)
    Import statement bringing in the handler function and definition for use in the main server.
    import { getCodingGuide, getCodingGuideDefinition } from './tools/convention/getCodingGuide.js';
Behavior3/5

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

Annotations provide a title ('Get Coding Guide') but no hints like readOnly or destructive. The description doesn't add behavioral traits beyond implying a retrieval action ('Get'), but it doesn't disclose details such as data sources, rate limits, authentication needs, or output format. Since annotations are minimal, the description carries more burden but only offers basic intent without operational context.

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

Conciseness2/5

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

The description is repetitive and poorly structured, with redundant synonyms ('guide|rules|convention' repeated) and lacks front-loaded clarity. It wastes space on synonyms instead of providing actionable information, making it inefficient and hard to parse quickly for an AI agent.

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 has no output schema and minimal annotations, the description is incomplete. It doesn't explain what the tool returns (e.g., a text guide, a structured document, or an error message), nor does it cover behavioral aspects like error handling or dependencies. For a retrieval tool with two parameters, this leaves significant gaps in understanding how 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%, with clear descriptions for both parameters ('name' and 'category'). The description doesn't add any meaning beyond the schema, such as examples or constraints. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract from the well-documented parameters.

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 is a tautology that essentially restates the tool name 'get_coding_guide' with synonyms ('guide|rules|convention|standards|best practices'). It doesn't specify what action is performed (e.g., retrieve, display, or analyze) or what resource is accessed. While it mentions 'Get coding guide,' this is too vague to distinguish it from siblings like 'apply_quality_rules' or 'validate_code_quality' that might involve coding standards.

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?

There is no guidance on when to use this tool versus alternatives. It doesn't mention any context, prerequisites, or exclusions, nor does it refer to sibling tools. For example, it doesn't clarify if this is for retrieving predefined guides versus generating new ones, leaving the agent to guess based on the name alone.

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/ssdeanx/ssd-ai'

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