Skip to main content
Glama

contract_get

Read-only

Fetch a contract by name, ID, or unique prefix, including its current shape and all earlier versions.

Instructions

Fetch one contract in full by name, id or unique id prefix: its current shape and every earlier version. Use when a brief or contract_list names a contract you consume; to find contracts by path or kind use contract_list. not_found if there is none, and an ambiguous prefix is invalid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe contract's name, its id, or a unique prefix of the id.
agentYesYour stable agent name.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesok. not_found: no such contract. invalid: an ambiguous id prefix.
messageNoHuman-readable detail, on most outcomes other than ok.
contractNoIn full: id, name, kind, consumers, current (version, shape, notes, published_by, published_at), and history, oldest first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.1.2
    • addedInput schema / properties / agent / description
      Added value: +"Your stable agent name."
    • addedInput schema / properties / name / description
      Added value: +"The contract's name, its id, or a unique prefix of the id."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Any result may also carry lost, inbox, inbox_more and persist_error; see guide.",
      +  "properties": {
      +    "contract": {
      +      "description": "In full: id, name, kind, consumers, current (version, shape, notes, published_by, published_at), and history, oldest first.",
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable detail, on most outcomes other than ok.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "ok. not_found: no such contract. invalid: an ambiguous id prefix.",
      +      "enum": [
      +        "ok",
      +        "conflict",
      +        "not_found",
      +        "none",
      +        "invalid",
      +        "cancelled"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.1.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description consistently describes a read operation, so there is no contradiction. It adds useful behavioral context: not_found when no contract exists and invalid when the prefix is ambiguous, plus the fact that all earlier versions are returned.

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?

Two sentences with no wasted words. The core action and scope are front-loaded, followed by usage guidance and error semantics. Highly efficient.

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?

The description covers when to use, how to look up, what is returned, and key error conditions. With an output schema present and readOnlyHint annotation, an agent has everything needed to invoke this tool 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%, so the schema already documents both parameters. The description adds context about unique prefix validity and lookup semantics, but the parameter meanings are already well covered by the input 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 and resource: 'Fetch one contract in full' by name, id, or unique prefix. It explicitly differentiates itself from contract_list, which finds contracts by path or kind, so an agent can immediately tell when this tool applies.

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 says when to use: 'when a brief or contract_list names a contract you consume.' It also names the alternative for different lookup needs and documents the failure mode for ambiguous prefixes, leaving little to inference.

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