MCP Grammar Tools
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENAI_MODEL | No | Model name for generation (e.g., gpt-4). Optional. | |
| OPENAI_API_KEY | No | OpenAI API key for generation (required for OpenAI or custom endpoint). | |
| OPENAI_BASE_URL | No | Custom base URL for OpenAI-compatible API. | |
| ENABLE_GENERATION | No | Set to 'true' to enable the generate_with_grammar tool. | |
| AZURE_OPENAI_API_KEY | No | Azure OpenAI API key (if using API key auth). | |
| AZURE_OPENAI_ENDPOINT | No | Azure OpenAI endpoint URL (e.g., https://your-resource.openai.azure.com/). | |
| AZURE_OPENAI_API_VERSION | No | Azure OpenAI API version (e.g., 2025-01-01-preview). Optional. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| validate_grammarA | Validate llguidance grammar completeness and consistency using llguidance's built-in validator. Returns validation result with any errors or warnings. |
| run_batch_validation_testsA | Run batch validation tests from a JSON file against an llguidance grammar. Test file should contain array of {input, should_parse, description?} objects. Returns high-level statistics (total, passed, failed, success_rate) and detailed information for failed tests. |
| get_llguidance_documentationA | Fetch the llguidance grammar syntax documentation. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| llguidance Grammar Syntax Documentation | Complete llguidance grammar syntax documentation from the official GitHub repository |
TDQS
Scored across 3 tools
Each tool has a distinct purpose: documentation retrieval, batch testing, and grammar validation. There is no overlap or ambiguity.
All tool names follow a consistent verb_noun pattern (get_, run_, validate_) with clear and descriptive names.
Three tools is appropriate for a focused grammar validation and testing server, covering the core functionalities without being overly sparse.
The server covers documentation retrieval, validation, and batch testing. A minor gap is the lack of grammar editing or listing tools, but the core use case is well supported.