Skip to main content
Glama

constraint_validate

Read-only

Validate values against LMQL-style constraints like YQ_PATH, JSON_VALUE, or INT to ensure data integrity before processing in JSON/YAML/TOML operations.

Instructions

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:

  • YQ_PATH: Valid yq path (e.g., '.users[0].name')

  • YQ_EXPRESSION: Valid yq expression with pipes (e.g., '.items | length')

  • CONFIG_FORMAT: Valid format ('json', 'yaml', 'toml', 'xml')

  • KEY_PATH: Dot-separated key path (e.g., 'config.database.host')

  • INT: Valid integer

  • JSON_VALUE: Valid JSON syntax

  • FILE_PATH: Valid file path syntax

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
constraint_nameYesName of the constraint to validate against (e.g., 'YQ_PATH', 'CONFIG_FORMAT', 'INT')
valueYesValue to validate

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Tool Definition Quality

Score is being calculated. Check back soon.

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/bitflight-devops/mcp-json-yaml-toml'

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