Skip to main content
Glama

describe_contract

Read-onlyIdempotent

Return a contract's JSON Schema and markdown summary of inputs, sources, sinks, assembly, write_back, and output shape without executing it. Pass vault only on multi-vault setups to avoid ambiguity.

Instructions

Return the input JSON Schema + an auto-generated markdown summary for a contract (Q-DESCRIBE). Pure function — does not execute the contract. Summary lists Inputs / Sources / Sinks / Assembly (numbered) / write_back / Output Shape. Omit vault on single-vault setups; on multi-vault setups, pass vault to disambiguate (returns {ok:false, reason:'ambiguous_vault'} otherwise).

Input Schema

NameRequiredDescriptionDefault
nameYesRegistered contract name (see register_contracts_as_tools)
vaultNoVault name; omit on single-vault setups

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-rc.5

TDQS

A4.4/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 safety is covered. The description adds genuinely new behavior: it will not execute the contract, and it returns {ok:false, reason:'ambiguous_vault'} on ambiguous vaults, plus the exact contents of the generated summary.

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 the primary behavior, then packs the summary contents and vault rules into tight clauses. Dense with parentheticals but nearly every clause carries actionable information; no padding.

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, so the description compensates by enumerating the return structure (Inputs/Sources/Sinks/Assembly/write_back/Output Shape) and the error shape. Combined with the annotations, an agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description goes beyond the schema's 'omit on single-vault setups' by defining the multi-vault requirement and the precise error result, adding real semantic value for the vault parameter.

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 and resource ('Return the input JSON Schema + an auto-generated markdown summary for a contract') and immediately scopes it as a pure, non-executing function. This cleanly distinguishes it from execution-oriented siblings like instantiate_contract.

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

Usage Guidelines4/5

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

Gives explicit conditional usage for the vault parameter (omit on single-vault, pass on multi-vault) and describes the failure mode otherwise. It implies when to use this versus executing a contract ('does not execute'), but never names a sibling alternative outright, so it stops short of a 5.

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