Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| data_query | Extract specific data, filter content, or transform structure without modification. Use when you need to extract specific data, filter content, or transform the structure of a JSON, YAML, or TOML file without modifying it. Output contract: Returns {"success": bool, "result": Any, "format": str, "file": str, ...}. Side effects: None (read-only). Failure modes: FileNotFoundError if file missing. ToolError if format disabled or query fails. |
| data | Get, set, or delete data in JSON, YAML, or TOML files. Use when you need to get, set, or delete specific values or entire sections in a structured data file. Output contract: Returns {"success": bool, "result": Any, "file": str, ...}. Side effects: Modifies file on disk if operation is 'set' or 'delete'. Failure modes: FileNotFoundError if file missing. ToolError if format disabled or invalid JSON. Operations:
|
| data_schema | Unified schema operations tool. Actions:
Examples:
|
| data_convert | Convert file format. Use when you need to transform a file from one format (JSON, YAML, TOML) to another. Output contract: Returns {"success": bool, "result": str, ...} or writes to file. Side effects: Writes to output_file if provided. Failure modes: FileNotFoundError if input missing. ToolError if formats same or conversion fails. |
| data_merge | Merge two files into a single deep-merged configuration. Performs a deep merge where values from the second (overlay) file override or extend those in the first (base) file. If output_file is provided the merged result is written to that path; otherwise the merged content is returned in the response. Parameters: file_path1 (str): Path to the base file. file_path2 (str): Path to the overlay file whose values override the base. output_format (str | None): Desired output format: "json", "yaml", or "toml". Defaults to the format of the first file. output_file (str | None): Optional path to write the merged output. When omitted, merged content is returned. Returns: dict: A payload describing the merge. On success includes "success": True, "file1", "file2", "output_format", and either "result" (merged content) or "output_file" (written path). Raises: ToolError: If an input file is missing, its format is not enabled, the output format is invalid, or the merge fails. |
| constraint_validate | Validate a value against an LMQL-style constraint. Use this tool to check if a value satisfies a constraint before using it in other operations. Supports partial validation - can tell if an incomplete input could still become valid. Output contract: Returns {"valid": bool, "error": str?, "is_partial": bool?, ...}. Side effects: None (read-only validation). Failure modes: ToolError if constraint name unknown. Available constraints:
|
| constraint_list | Return a list of all registered LMQL constraints with their metadata. Returns:
result (dict): A dictionary with keys:
- "constraints": a list of constraint objects; each object includes a "name" key and the constraint's definition fields (e.g., "description", any other metadata).
- "usage": a string describing how to validate a value against a constraint (e.g., call |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| explain_config | Produce a natural-language prompt that requests an analysis of a configuration file. The generated prompt asks an assistant to: 1. Identify the file format (JSON, YAML, TOML). 2. Summarize the file's key sections and their purpose. 3. Highlight critical settings and potential misconfigurations. 4. Check adherence to an available schema, if one exists. Parameters: file_path (str): Path to the configuration file to be analyzed. Returns: prompt (str): A formatted prompt string referring to the provided file path. |
| suggest_improvements | Generate a prompt to suggest improvements for a configuration file. |
| convert_to_schema | Generate a prompt to create a JSON schema from a configuration file. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| list_all_constraints | Provide metadata and definitions for all registered LMQL constraints. Returns: A dictionary with: - "constraints": a mapping of all constraint definitions keyed by name. - "description": a short human-readable description of the constraint collection. - "usage": a brief usage note for applying these constraints in constrained generation. |