Skip to main content
Glama

Cotlet: test a Custom API endpoint

cotlet_api_test

Runs an endpoint script once now with input, writes not sent, and answers its JSON, log, duration and credits (10 on success, none on failure). Test the exact script you will save.

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": {
      "script": "<script>",
      "site": "<site>"
    },
    "name": "cotlet_api_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesThe app's site, e.g. substack.com: ctx.http reaches it and its subdomains.
inputNoSample input, as a caller's JSON body.
scriptYesThe Python script: `def run(ctx):` returning the answer (see the guide).
input_schemaNoJSON Schema of the input, an object (type, properties, items, required).
output_schemaNoJSON Schema of the answer (type, properties, items, required).

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?

Adds real behavioral context beyond the annotations: writes are not sent despite readOnlyHint=false, and it discloses the return payload (JSON, log, duration) and the credit cost model (10 on success, none on failure). The only gap is whether the test itself persists anything about the script or counts against quotas beyond credits.

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 tight sentences with zero filler; the action, the no-write guarantee, and the cost/return profile are all front-loaded. The final sentence earns its place by tying the tool to the save workflow.

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 five-parameter tool with nested objects and no output schema, the description covers what it returns, what it costs, and what it does not do. It could say slightly more about how `input_schema`/`output_schema` shape validation, but nothing an agent needs in order to call it correctly 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%, so the schema already documents all five parameters including the nested input/output schemas. The description only re-references `input` as the sample body and adds no format or syntax detail beyond that, which is the expected baseline when the schema does the heavy lifting.

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 ('Runs an endpoint script once now') plus a precise scope constraint ('writes not sent'). The closing line 'Test the exact script you will save' implicitly contrasts it with the save sibling, so an agent can tell this apart from cotlet_api_save without opening either schema.

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?

'Test the exact script you will save' gives clear usage context: run this as a dry-run before persisting. It stops short of naming the alternative tool or stating explicit when-not conditions, so it is strong but not complete routing guidance.

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.