Skip to main content
Glama
natl-set

ANTLR4 MCP Server

by natl-set

check-style

Evaluate ANTLR4 grammar files for style, naming, and best practices, providing a quality score and specific issues.

Instructions

Check grammar style and best practices with quality scoring.

When to use: Code review, maintaining grammar quality, enforcing conventions.

Checks:

Naming Conventions:

  • Lexer rules should use UPPER_CASE

  • Parser rules should use lowerCamelCase

Best Practices:

  • Missing grammar declaration

  • Unused/orphan rules

  • Overly complex rules

Maintainability:

  • Missing documentation on complex rules

  • Rule complexity warnings

Returns:

  • Issues with severity (error/warning/info)

  • Style score (0-100)

  • Specific suggestions for each issue

Example: from_file: "MyGrammar.g4"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_fileNoOptional: path to a grammar file to read
grammar_contentNoThe ANTLR4 grammar file content
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It discloses the types of checks performed, the return structure (issues with severity, score, suggestions), and provides an example. It does not explicitly state it is read-only, but the nature of 'check-style' implies no side effects. The description gives sufficient insight into behavior.

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

Conciseness5/5

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

The description is well-structured with clear sections (When to use, Checks, Returns, Example) and bullet-pointed check items. It is concise, front-loaded with the core purpose, and every sentence adds value without redundancy.

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

Completeness4/5

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

The description provides a comprehensive overview: purpose, when to use, what checks are performed, what is returned, and an example. There is no output schema, so the description appropriately explains return values. It could mention that grammar can also be provided via grammar_content, but the schema covers that, so the description remains complete.

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?

The schema description covers both parameters (from_file and grammar_content) at 100%, so the schema already documents them. The description adds an example using from_file, which is helpful, but it does not explain when to use one parameter over the other. Since schema coverage is high, a baseline of 3 is appropriate.

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

Purpose5/5

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

The description clearly states 'Check grammar style and best practices with quality scoring', which uses a specific verb (check) and resource (grammar style and best practices) and distinguishes it from sibling tools. It also lists concrete checks (naming conventions, best practices, maintainability) that further clarify its unique role.

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

Usage Guidelines4/5

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

The description includes a 'When to use' section listing clear contexts: 'Code review, maintaining grammar quality, enforcing conventions.' However, it does not explicitly mention alternatives or when not to use this tool, so it lacks exclusions and direct sibling comparisons.

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/natl-set/antlr4-mcp'

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