Skip to main content
Glama

update_endpoint

DestructiveIdempotent

Partially updates an API endpoint doc; send only fields to change (same fields as Create Endpoint). Any update moves a non-pending endpoint back to draft (state 1), so republish with Update Endpoint State. Requires READ_WRITE permission. Only works for type 4/5 items (otherwise 400 "Wrong Route"). Invalid fields return 400 with the validation message. Body fields:

name (string, optional) - Endpoint title shown in docs. urlName (string, optional) - New URL slug; made unique among siblings. Left unchanged if omitted (it is not re-derived from name). requestType (string, optional) - HTTP method: GET, POST, PUT, PATCH, DELETE, etc. URL (string, optional) - Request URL (may contain {{variables}}). description (string, optional) - Endpoint description (HTML/text). body (object, optional) - Request body definition, e.g. {"type":"JSON","raw":{"rawType":"JSON","value":"{...}"}}; type can be none, JSON, TEXT, XML, HTML, multipart/form-data, application/x-www-form-urlencoded. headers (object, optional) - Headers keyed by name: {"Authorization":{"checked":"true","value":"Bearer {{token}}","description":""}}. params (object, optional) - Query params keyed by name, same shape as headers. pathVariables (object, optional) - Path variables keyed by index: {"0":{"checked":"notApplicable","key":"id","value":"","description":"Payment id"}}. bodyDescription (object, optional) - Per-field body docs: {"amount":{"value":100,"type":"number","description":"Amount in cents"}}. sampleResponse (array, optional) - Sample responses: [{"title":"Success","status":200,"description":"","data":{...}}]. authorizationData (object, optional) - Auth config object (or null). preScript (string, optional) - Pre-request JavaScript. postScript (string, optional) - Post-response test JavaScript. docViewData (array, optional) - Order of doc sections, e.g. [{"type":"host"},{"type":"body"},...]. state (number, optional) - 0 pending, 1 draft, 2 approved, 3 rejected. Accepted, but the server sets state 1 (draft) on every update unless the endpoint is currently pending (0). Use Update Endpoint State to publish. uniqueTabId (string, optional) - Optional browser tab id used only to suppress the realtime socket echo to the calling tab; agents can omit it. PUT https://api.docstar.io/orgs/:orgId/endpoints/:endpointId

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": {
      "orgId": "<orgId>",
      "endpointId": "<endpointId>"
    },
    "name": "update_endpoint"
  }
}

Input Schema

NameRequiredDescriptionDefault
URLNoe.g. https://api.example.com/v1/payments
bodyNoe.g. {"type":"JSON","raw":{"rawType":"JSON","value":"{\"amount\":100,\"currency\":\"USD\"}"}}
nameNoe.g. Create Payment
orgIdYesThe orgId path variable
paramsNoe.g. {}
headersNoe.g. {"Content-Type":{"checked":"true","value":"application/json","description":""}}
endpointIdYesThe endpointId path variable
descriptionNoe.g. Creates a new payment for a customer
requestTypeNoe.g. POST
pathVariablesNoe.g. {}
sampleResponseNoe.g. [{"title":"Success","status":200,"description":"","data":{"id":"pay_1"}}]

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Discloses the critical side effect that the description alone can carry: any update moves a non-pending endpoint back to draft (state 1), which is exactly the destructive behavior the annotations flag but do not explain. It also adds READ_WRITE permission requirements, error behavior (400 with validation message), the fact that the server overrides the state field, and that uniqueTabId can be omitted by agents.

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?

Front-loaded with behavior and constraints before the field catalogue, and each body-field line carries real information (shapes, examples, gotchas). It is long, but the length is justified by 11+ undocumented-in-schema fields; only marginal trimming (e.g. the trailing raw PUT URL) would be possible.

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?

Covers everything an agent needs for a destructive, non-idempotent-in-effect mutation: preconditions (type 4/5, READ_WRITE), side effects (state reset), recovery path (Update Endpoint State), error modes (400 validation / Wrong Route), and all body field shapes. No output schema exists, and the description still indicates success/error signals sufficiently.

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

Parameters5/5

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

Schema coverage is 100% for the 11 declared properties, but the description documents fields absent from the schema entirely (urlName, bodyDescription, authorizationData, preScript, postScript, docViewData, state, uniqueTabId) with shapes and examples. It also adds non-obvious semantics the schema cannot express, e.g. urlName is not re-derived from name, and state is accepted but forced to 1 unless currently pending.

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?

Opens with a specific verb+resource+scope ('Partially updates an API endpoint doc; send only fields to change'), which immediately distinguishes it from create_endpoint and any full-replace operation. It also states the item-type constraint (type 4/5 only), so an agent knows exactly what this tool operates on.

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 gives the PATCH-style semantics ('send only fields to change, same fields as Create Endpoint'), names the follow-up tool required after every update ('republish with Update Endpoint State'), and states the exclusion condition ('Only works for type 4/5 items, otherwise 400 Wrong Route'). When-to-use, when-not-to-use, and the alternative are all present.

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.

Resources