Skip to main content
Glama

caveat_validate

Read-onlyIdempotent

Validate inline Caveat programs by loading source, listing declarations, and reporting load errors. Use it first to check a program loads before running authoring diagnostics or tests.

Instructions

Load inline source with the installed runtime and list its declarations. Start here to find load errors; use caveat_check for authoring diagnostics and caveat_test to verify expected behavior. No events are dispatched. report (caveat-validate/0.1) contains program, loads, events, reading_streams, decision_series and displayed bindings, or a load error. exitCode: 0 loaded; 2 load failure. Returns the same JSON in structuredContent and text: {schema:"caveat-authoring/0.1",operation,sourceSha256,runtime,exitCode,report}. Read exitCode even when isError is false. Bridge failures instead set isError:true with {schema:"caveat-authoring-error/0.1",error:{kind,message}}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesComplete inline Caveat program text, available as the virtual file inline.cav. No file path or URL lookup. At most 1 MiB of UTF-8 source; each call uses a fresh runtime.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • changedInput schema / properties / source / description
      Previous value: -"Inline Caveat source; no file or URL lookup."New value: +"Complete inline Caveat program text, available as the virtual file inline.cav. No file path or URL lookup. At most 1 MiB of UTF-8 source; each call uses a fresh runtime."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), yet the description adds substantial context beyond them: 'No events are dispatched,' the report's field list, exitCode meanings (0 loaded; 2 failure), the structuredContent/text mirroring, and the caveat that isError can be false with a nonzero exitCode plus the isError:true bridge-failure shape.

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

Conciseness4/5

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

Front-loads purpose, then routing, then return/exit semantics; every sentence carries information. It is dense and slightly enumerative (report field list, JSON shape inline), but no sentence is redundant 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?

There is no output schema, so the description carries the full burden of describing returns, and it does: report contents, exitCode values, the exact response envelope shape, and the separate error envelope when isError is true. Nothing an agent needs to call and interpret this tool is missing.

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 the single param (source) is fully documented in the schema, including the 1 MiB limit, inline.cav virtual-file name, and 'fresh runtime' note. The description's 'Load inline source' restates rather than extends that, so the baseline 3 is appropriate.

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 concrete verb+resource ('Load inline source ... and list its declarations') and explicitly positions itself against siblings by naming caveat_check and caveat_test with their distinct purposes. An agent can distinguish it from all named siblings without opening schemas.

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?

Gives explicit routing: 'Start here to find load errors; use caveat_check for authoring diagnostics and caveat_test to verify expected behavior.' This is a when-to-use plus named alternatives, exactly the guidance an agent needs to pick the right tool.

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