Skip to main content
Glama
Bristlecone2026

Bristlecone Logic Utilities

validate_schema

Read-onlyIdempotent

Validate a JSON payload against a reference schema to confirm all mandatory keys are present. Returns validation status and missing keys, verifying structure before downstream processing.

Instructions

Deterministically validates that a target JSON payload contains all mandatory keys specified in a reference schema dictionary. Returns a boolean validation status and a list of missing keys. Use when verifying payload structure before downstream processing. Do not use for regex string validation or deep recursive type casting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe target JSON data object to inspect and validate against the schema definition.
schema_definitionYesA JSON object defining mandatory keys required in the target payload (e.g. {'user_id': '', 'status': ''}).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.3
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "missing_keys": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "valid": {
      -      "type": "boolean"
      -    }
      -  },
      -  "required": [
      -    "valid",
      -    "missing_keys"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds genuinely new context: it is deterministic, checks only mandatory keys, and returns a boolean plus a list of missing keys. Minor gap: no statement about behavior with malformed input or deeply nested keys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences: capability, return value, positive usage, negative usage. Front-loaded with the core action and zero filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description compensates by naming the return values (boolean status and missing-key list). Combined with 100% schema coverage and annotation-supplied safety profile, an agent has everything needed to call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and both parameters are already documented in the schema with examples, so the baseline is 3. The description restates the semantic relationship (target vs reference) but adds no syntax or format detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (validates) and resource (target JSON payload against a reference schema dictionary), plus the precise scope: mandatory keys only. The exclusions at the end differentiate it from a nearby capability like regex validation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly gives both when to use ('before downstream processing') and when not to ('not for regex string validation or deep recursive type casting'), which directly resolves ambiguity against siblings such as extract_web or repair_json.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.