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';

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