Skip to main content
Glama

get_coding_guide

Retrieve coding guides, rules, conventions, and best practices to follow established standards in software 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 main handler function that loads coding guides from a JSON file, finds the specified guide, optionally verifies category, and returns formatted content or 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) { // 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'}` }] }; } }
  • ToolDefinition object defining the tool name, description, input schema (requiring 'name', optional 'category'), 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:658-659 (registration)
    Registration of the tool handler in the central switch statement within executeToolCall function, dispatching calls to getCodingGuide.
    case 'get_coding_guide': return await getCodingGuide(args as any) as CallToolResult;
  • src/index.ts:137-137 (registration)
    Inclusion of the tool definition in the central tools array used for listing tools via MCP protocol.
    getCodingGuideDefinition,

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