Skip to main content
Glama

create_endpoint

Destructive

Creates a new API endpoint doc (page type 4, draft) as the last child of the given page. Requires READ_WRITE permission. Publish it afterwards with Update Endpoint State (parent page must be published). Body fields:

name (string, optional) - Endpoint title shown in docs. urlName (string, optional) - URL slug; derived from name if omitted and made unique. 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"},...]; default set if omitted. state (number, optional) - 0 pending, 1 draft (default), 2 approved, 3 rejected. 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. POST https://api.docstar.io/orgs/:orgId/pages/:pageId/endpoints

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>",
      "pageId": "<pageId>"
    },
    "name": "create_endpoint"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond annotations, it discloses permission requirements, default draft state, placement under the parent page, unique urlName derivation, and the need for a published parent before publishing. It also explains that uniqueTabId only suppresses the realtime socket echo and 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?

The description is long, but the length is largely justified by the number of optional nested fields and request-body shapes. The purpose and prerequisites are front-loaded; minor redundancy and escaped HTML examples keep it from being maximally tight.

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 mutation tool with rich annotations and no output schema, it covers permissions, parent-page state, default draft state, creation placement, and most parameter shapes. The main missing item is what the call returns, which matters if the caller must immediately publish the newly created endpoint.

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?

Although schema coverage is 100%, the description adds substantial meaning: default state, allowed requestType values, body type variants, header/param/path-variable object shapes, sampleResponse shape, and uniqueTabId behavior. It also documents several endpoint request fields beyond the schema, making parameter expectations much clearer than the schema alone.

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 first sentence uses a specific verb and resource ('Creates a new API endpoint doc'), identifies page type 4 and draft state, and scopes placement as the last child of the given page. This clearly separates it from generic page/collection creation and from update_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 states the READ_WRITE prerequisite, tells the caller to publish afterwards with Update Endpoint State, and adds that the parent page must be published. This gives clear usage context, though it does not explicitly say when to prefer create_page or update_endpoint instead.

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