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. |
Capabilities
Features and capabilities supported by this server
| 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 |
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/guidance-ai/guidance-lark-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server