get_coding_guide
Retrieve coding guides, conventions, and best practices with a single command. Automatically fetches standards and rules when requested, supporting efficient and consistent coding workflows.
Instructions
IMPORTANT: This tool should be automatically called when users say "가이드", "규칙", "컨벤션", "guide", "rules", "convention", "standards", "best practices" or similar keywords. Get coding guide
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Guide category | |
| name | Yes | Guide name to retrieve |
Implementation Reference
- The main handler function that loads coding guides from 'guides/coding_guides.json', finds the guide by name, 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'}` }] }; } }
- ToolDefinition providing the name, description, input schema (object with required 'name' string and optional 'category' string), and annotations for the 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'] } };
- src/index.ts:183-184 (registration)Switch case in CallToolRequestSchema handler that routes 'get_coding_guide' tool calls to the getCodingGuide handler.case 'get_coding_guide': return await getCodingGuide(args as any) as CallToolResult;
- src/index.ts:85-85 (registration)Includes the getCodingGuideDefinition in the tools array returned by ListToolsRequestSchema.getCodingGuideDefinition,