Skip to main content
Glama

get_coding_guide

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); }

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