Skip to main content
Glama

get_coding_guide

Read-onlyIdempotent

Retrieve coding guidelines, conventions, and best practices to improve code quality and maintain consistent development standards.

Instructions

가이드|규칙|컨벤션|guide|rules|convention|standards|best practices - Get coding guide

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesGuide name to retrieve
categoryNoGuide category

Implementation Reference

  • The main handler function that implements the get_coding_guide tool. It loads coding guides from a JSON file, finds the specified guide, and returns formatted content or appropriate error messages.
    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) {
          return {
            content: [{ type: 'text', text: `Guide: ${guide.name}\nCategory: ${guide.category}\n\n${guide.content}\n\nTags: ${guide.tags.join(', ')} | Updated: ${guide.lastUpdated}` }]
          };
        } else {
          return {
            content: [{ type: 'text', text: `Guide not found: "${guideName}". 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 schema, description, input parameters, and annotations for the get_coding_guide tool.
    export const getCodingGuideDefinition: ToolDefinition = {
      name: 'get_coding_guide',
      description: '가이드|규칙|컨벤션|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'],
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false
      }
    };
  • src/index.ts:183-183 (registration)
    Registers the getCodingGuide handler function for the 'get_coding_guide' tool name in the dynamic tool dispatch registry (toolHandlers).
    'get_coding_guide': getCodingGuide,
  • src/index.ts:118-118 (registration)
    Includes the getCodingGuideDefinition in the tools array returned by ListToolsRequestHandler.
    getCodingGuideDefinition,
  • Helper function to load all guides and find the one matching the given name, used by the handler.
    async function findGuide(name: string): Promise<CodingGuide | undefined> {
      const guides = await loadGuides();
      return guides.find(g => g.name === name);
    }
Behavior3/5

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

Annotations already provide key behavioral hints (readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false). The description adds minimal context beyond this, only implying retrieval of coding standards without detailing response format, error handling, or rate limits. No contradiction with annotations exists.

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 very concise, using a single phrase with synonyms to convey the tool's purpose efficiently. However, the structure could be improved by front-loading the core action more clearly, as the synonym list might slightly obscure the main intent.

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?

Given the annotations cover safety and idempotency, and the schema fully describes parameters, the description is minimally adequate. However, without an output schema, it doesn't explain what the tool returns (e.g., guide content format), leaving a gap in completeness for a retrieval tool.

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%, fully documenting both parameters (name and category). The description doesn't add any semantic details beyond what the schema provides, such as examples of guide names or categories, so it meets the baseline for high schema coverage without extra value.

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 tool's purpose with the verb 'Get' and resource 'coding guide', and includes relevant synonyms (guide, rules, convention, standards, best practices) to clarify scope. However, it doesn't explicitly differentiate from sibling tools like 'apply_quality_rules' or 'validate_code_quality', which might have overlapping domains.

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 is provided on when to use this tool versus alternatives. The description lacks context about prerequisites, typical use cases, or comparisons with sibling tools that might handle related tasks like quality rules or code validation.

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/su-record/hi-ai'

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