JSON Contracts
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Reserved for future HTTP transport. | 3000 |
| DEBUG | No | Enables debug logging to stderr. | false |
| MCP_TRANSPORT | No | Transport. v1 implements stdio. | stdio |
| API_AUTH_TOKEN | No | Reserved for future HTTP Bearer auth. | |
| WATCH_CONTRACTS | No | Watches local contracts and reloads on changes. | true |
| JSON_CONTRACTS_DIR | No | Folder containing contract .json files. | ./json-contracts |
| ALLOW_INVALID_CONTRACTS | No | If true, invalid contracts are skipped with warnings. | false |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_contractsA | List currently loaded JSON contracts. |
| read_contractC | Read a loaded JSON contract. |
| get_json_contractB | Return schema, rules, examples, instructions, and input so the agent/model can produce JSON. |
| get_edit_contractA | Return schema, rules, current JSON, edit instructions, and input so the agent/model can edit existing JSON. |
| validate_jsonC | Validate agent-produced JSON against a contract schema. |
| get_repair_contractC | Return schema, rules, previous invalid JSON, validation errors, and repair instructions. |
| statusA | Return json-contracts MCP server status and loaded contract metadata. |
| reload_contractsA | Rescan the JSON contracts directory and reload valid contracts. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| json_contract_prompt | Render a reusable prompt that tells the agent/model how to produce JSON from a selected contract. |
| edit_contract_prompt | Render a reusable prompt that tells the agent/model how to edit existing JSON from a selected contract. |
| repair_contract_prompt | Render a reusable prompt that tells the agent/model how to repair JSON that failed validation. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| chart-generation | Convert natural language into a structured BI chart generation spec. |
| create-filter | Convert natural language into a structured API filter object. |
| ecommerce-return | Convert customer messages into a structured ecommerce return, exchange, refund, or cancellation request. |
| expense-report | Convert receipts, reimbursement notes, or expense messages into a structured finance expense report line item. |
| legal-client-intake | Convert prospective client messages into a structured legal intake object for routing and conflict checks. |
| patient-intake | Convert patient messages into a structured healthcare intake and triage object. |
| real-estate-lead | Convert buyer, renter, seller, or tenant messages into a structured real estate lead profile. |
| support-ticket | Convert natural language into a support ticket object. |
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/json-contracts/json-contracts'
If you have feedback or need assistance with the MCP directory API, please join our Discord server