get_syntax_rules
Retrieve syntax rules and preferences for specific tools to maintain consistent formatting and best practices across conversations.
Instructions
Get syntax-specific rules for a tool category
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool_name | Yes | Tool name or category |
Implementation Reference
- src/server/index.ts:227-249 (handler)The handler implementation for the 'get_syntax_rules' MCP tool.
case 'get_syntax_rules': { const toolName = String(args?.['tool_name'] ?? ''); if (!toolName) { return { content: [{ type: 'text', text: 'Error: tool_name is required' }] }; } const matches = engine.matchContexts({ tool: toolName }); const rules: Record<string, unknown> = {}; for (const m of matches) { if (m.context.syntax_rules) { rules[m.context.tool_category] = m.context.syntax_rules; } } return { content: [ { type: 'text', text: Object.keys(rules).length ? JSON.stringify(rules, null, 2) : `No syntax rules found for tool: ${toolName}`, }, ], }; } - src/server/index.ts:80-93 (registration)The tool registration definition for 'get_syntax_rules'.
{ name: 'get_syntax_rules', description: 'Get syntax-specific rules for a tool category', inputSchema: { type: 'object' as const, properties: { tool_name: { type: 'string', description: 'Tool name or category', }, }, required: ['tool_name'], }, },