Skip to main content
Glama

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
NameRequiredDescriptionDefault
tool_nameYesTool name or category

Implementation Reference

  • 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}`,
          },
        ],
      };
    }
  • 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'],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full disclosure burden, yet reveals nothing about side effects, error conditions (e.g., invalid tool_name), return format, or whether results are cached. 'Get' implies read-only but this is weak inference rather than explicit disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely brief at 7 words. It avoids redundancy and leads with the verb. However, the brevity crosses into under-specification given the lack of supporting annotations or output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should explain what 'syntax rules' look like or when to prefer this over 'get_tool_context'. For a single-parameter tool, it meets minimum viability but leaves critical operational context undefined.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (tool_name is fully described as 'Tool name or category'), establishing baseline 3. The description reinforces that the parameter accepts categories ('for a tool category'), but adds no syntax details, examples, or validation constraints beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Get') and resource ('syntax-specific rules'), but fails to distinguish from sibling 'get_tool_context'. The term 'syntax-specific' is domain-specific without explanation, and the relationship to 'tool category' versus the singular 'tool_name' parameter creates ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance provided on when to use this versus alternatives like 'get_tool_context', or prerequisites for the 'tool_name' parameter. The description offers no 'when-not-to-use' or workflow context despite the rich sibling set suggesting complex interactions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/doobidoo/MCP-Context-Provider'

If you have feedback or need assistance with the MCP directory API, please join our Discord server