Skip to main content
Glama

Create API endpoint

create_api_endpoint

Create an outbound custom API-endpoint tool in the org (static, non-secret headers only). Attach it to an agent with attach_api_endpoint; set auth by reference via set_endpoint_auth, never inline secrets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoRequest URL (may contain {path_parameters}).
nameYesInternal name for the endpoint.
methodNoHTTP method.
tool_nameNoThe tool name the agent calls it by.
content_typeNoRequest content type.
body_templateNoRequest body template.
return_directNoEnd the agent turn after this tool returns (for 'send' tools).
static_headersNoNon-secret static request headers.
response_formatNoHow to parse the response.
save_to_historyNoInclude the tool result in conversation history (for 'retrieve' tools).
query_parametersNoDefault query parameters.
tool_descriptionNoWhat the tool does (shown to the model).
tool_input_schemaNoJSON schema of the arguments the agent supplies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • addedInput schema / properties / body_template
      Added value: +{
      +  "description": "Request body template.",
      +  "type": "string"
      +}
    • addedInput schema / properties / content_type
      Added value: +{
      +  "description": "Request content type.",
      +  "enum": [
      +    "application/json",
      +    "application/xml",
      +    "application/x-www-form-urlencoded",
      +    "multipart/form-data",
      +    "text/plain",
      +    "custom"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / method
      Added value: +{
      +  "description": "HTTP method.",
      +  "enum": [
      +    "GET",
      +    "POST",
      +    "PUT",
      +    "DELETE",
      +    "PATCH",
      +    "HEAD",
      +    "OPTIONS"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / name / description
      Added value: +"Internal name for the endpoint."
    • addedInput schema / properties / query_parameters
      Added value: +{
      +  "description": "Default query parameters.",
      +  "type": "object"
      +}
    • addedInput schema / properties / response_format
      Added value: +{
      +  "description": "How to parse the response.",
      +  "enum": [
      +    "json",
      +    "xml",
      +    "text",
      +    "auto"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / return_direct
      Added value: +{
      +  "description": "End the agent turn after this tool returns (for 'send' tools).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / save_to_history
      Added value: +{
      +  "description": "Include the tool result in conversation history (for 'retrieve' tools).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / static_headers
      Added value: +{
      +  "description": "Non-secret static request headers.",
      +  "type": "object"
      +}
    • addedInput schema / properties / tool_description
      Added value: +{
      +  "description": "What the tool does (shown to the model).",
      +  "type": "string"
      +}
    • addedInput schema / properties / tool_input_schema
      Added value: +{
      +  "description": "JSON schema of the arguments the agent supplies.",
      +  "type": "object"
      +}
    • addedInput schema / properties / tool_name
      Added value: +{
      +  "description": "The tool name the agent calls it by.",
      +  "type": "string"
      +}
    • addedInput schema / properties / url
      Added value: +{
      +  "description": "Request URL (may contain {path_parameters}).",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations indicate a non-read-only, non-destructive operation, and the description adds meaningful constraints: only static, non-secret headers are allowed, and auth must be set by reference. It also clarifies that this tool creates rather than attaches, so creating and wiring the endpoint are separate steps.

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 first sentence front-loads the purpose and primary constraint, and the second gives actionable next steps, so every sentence earns its place.

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

Completeness3/5

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

For a creation tool with 13 parameters and no output schema, the description does not state what the call returns or whether special permissions are required. The lifecycle and constraints are clear, but the missing outcome/return context leaves a meaningful 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 description need not restate parameters. It does add a specific constraint on `static_headers` and auth, but leaves the remaining parameters to the schema, which is acceptable given the high coverage.

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 action and resource: 'Create an outbound custom API-endpoint tool in the org'. It also distinguishes from related siblings by noting that attachment (`attach_api_endpoint`) and auth (`set_endpoint_auth`) are separate tools, so an agent can tell exactly which step this tool covers.

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?

Provides clear lifecycle guidance: after creation, use `attach_api_endpoint` and `set_endpoint_auth`, and never inline secrets. It does not explicitly compare against `create_mcp_server` or `update_api_endpoint` when choosing the tool, but the create-vs-update and API-endpoint-vs-MCP distinctions are reasonably implied.

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