Skip to main content
Glama

Cotlet: save a Custom API endpoint

cotlet_api_save

Saves a tested script as the user's endpoint (an existing name: its new version) and answers its URL, a curl example and the OpenAPI link. Show the user the test's JSON first. An endpoint that writes waits until the user allows the writes in the console: give them the link this answers.

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": {
      "name": "<name>",
      "description": "<description>",
      "site": "<site>",
      "script": "<script>",
      "input_schema": "<input_schema>",
      "output_schema": "<output_schema>"
    },
    "name": "cotlet_api_save"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe endpoint's name, e.g. latest_posts.
noteNoFor a new version: what changed, one line.
siteYesThe app's site, e.g. substack.com: ctx.http reaches it and its subdomains.
scriptYesThe Python script: `def run(ctx):` returning the answer (see the guide).
descriptionYesWhat it does, one line.
input_schemaYesJSON Schema of the input, an object (type, properties, items, required).
output_schemaYesJSON Schema of the answer (type, properties, items, required).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses two behaviors the annotations cannot: creating a new version under an existing name, and that write-capable endpoints block until the user authorizes writes in the console. It also states the return payload, which matters since there is no output schema.

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?

Three short sentences, front-loaded with the action and return values, followed by the two procedural cautions. Slightly awkward wording ("give them the link this answers") costs a point but nothing is redundant.

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?

With seven parameters, nested JSON Schemas, no output schema and a mutation side effect, the description covers the return values, the approval gate, and the testing prerequisite. It leaves failure modes untouched (name collision with an unrelated endpoint, schema validation errors), which is the remaining gap.

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 baseline is 3 and each parameter is already self-documented. The description adds the versioning concept but never ties it to the `note` parameter or explains how `script` is re-run, so it does not meaningfully extend the 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?

"Saves a tested script as the user's endpoint" gives a specific verb and resource, and the parenthetical "an existing name: its new version" clarifies the create-vs-version ambiguity that the name alone would leave open. It also names what the tool answers (URL, curl example, OpenAPI link), so an agent knows exactly what comes back.

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?

"Show the user the test's JSON first" establishes a prerequisite flow and implicitly routes the agent through the test tool before saving, and the write-approval sentence explains what to do when the endpoint mutates. It stops short of naming sibling tools (e.g. the test or control tools) explicitly, so the routing is inferred rather than stated.

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.