Skip to main content
Glama

add_api_example

Idempotent

Save a response example on an endpoint (for instance the 402 your handler returns for a declined card). Replaces the example with the same name, so it is safe to repeat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoExample response body (any JSON).
nameYese.g. Card declined.
pathNoRoute path as written in the code, e.g. /v1/charges/:id or /v1/charges/{id}.
methodNoHTTP method of the route, e.g. POST. Use with path instead of endpoint_id.
statusYes
headersNo
endpoint_idNoId of the endpoint. Alternative to method + path.
status_textNo
collection_idYesId from list_api_collections.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

The description goes beyond the idempotentHint by explaining the mechanism: examples are replaced by name, which is why repeating is safe. This is useful behavioral disclosure and does not contradict the readOnlyHint=false or destructiveHint=false annotations.

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 filler. The main operation is front-loaded, and the replacement behavior is stated compactly in the second sentence.

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

Completeness4/5

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

For a 9-parameter mutation tool, the description plus a reasonably descriptive schema covers how to identify the endpoint and what happens on repeat calls. It does not mention return values, but no output schema exists and the core invocation knowledge is present.

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 67%, so most parameters are already documented. The description adds only a use-case illustration for the response body/status rather than new parameter-level semantics, giving a solid but not exceptional contribution.

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?

The description opens with 'Save a response example on an endpoint', naming a specific verb, object, and target. The concrete declined-card example and the focus on response examples make it differentiable from sibling tools like create_api_collection, upsert_api_endpoint, or get_api_endpoint.

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?

It gives clear context: use this when saving a response example for an endpoint, with a concrete use-case shown. It does not explicitly name alternatives or exclusions, 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.