Skip to main content
Glama

contract_test

Send an API request and validate the response against an expected JSON schema, failing on structural drift such as missing fields or type changes.

Instructions

Send a request and check the response against a stored expected JSON schema. Fails if the response structure has drifted (missing fields, type changes).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "request_id": "<request_id>",
      "expected_schema": "<expected_schema>"
    },
    "name": "contract_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmedNoSet to true to confirm sending to an external URL after reviewing it
request_idYes
environment_idNo
expected_schemaYesJSON Schema object to validate against

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6-beta

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it leaves major behavior undisclosed: that sending to an external URL requires a confirmed=true gate (documented only in the schema), what 'fails' looks like (error vs result field), whether anything is persisted, or what auth/environment is used. It also says the schema is 'stored' while expected_schema is a required input the caller must supply, which is inconsistent and could mislead.

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?

Two tight sentences with the action first and the failure condition second; nothing is wasted. The only fault is the ambiguous 'stored' qualifier on the schema.

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

Completeness2/5

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

For a four-parameter tool with a nested schema object, no annotations, and no output schema, the description omits too much: how results and failures are surfaced, the confirmation flow for external URLs, and the meaning of the non-schema params. It is under-specified for the tool's complexity.

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

Parameters2/5

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

Schema description coverage is 50%, and the two required parameters (request_id, expected_schema) carry no schema descriptions. The description clarifies only that expected_schema is a JSON Schema to validate against; request_id, environment_id, and the confirmed safety flag are unexplained, so it does not compensate for the coverage gap.

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

Purpose4/5

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

The description states a specific verb+resource pair: send a request and validate its response against an expected JSON schema. It also names the failure condition (structural drift), which is more informative than a bare restatement of the name, though it never distinguishes itself from the sibling assert_response.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance. An agent cannot tell from this text whether to pick contract_test over assert_response or ai_detect_breaking_changes for a given regression check; only the drift-detection framing hints at a use case.

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