Skip to main content
Glama

Create API template

create_api_template

Api template authoring — create a BRAND-NEW api template (mints the template + its version 1). Fetch the definition's JSON Schema with get_api_template_definition_schema and author against it. Iterate with execute_api_template before wiring the template into a workflow; pass publish=true to publish in the same step once you're happy. (To add a version to an api template that already exists, use create_api_template_version.)

Input Schema

NameRequiredDescriptionDefault
slugYesURL-safe slug, optionally hierarchical.
publishNoIf true, immediately publish the version this call creates (the common create-then-publish in one step). Defaults to false; omit to leave the version as an unpublished draft.
definitionYesThe api template definition, as a JSON object. Fetch the exact JSON Schema it must satisfy with get_api_template_definition_schema and author against it (or copy an existing one with the get_*_version tool). The owning service validates it on submit.
descriptionNoWhat external call this template makes.
display_nameNoHuman-readable name.

Output Schema

NameRequiredDescriptionDefault
slugYes
versionYes
publishedYes
template_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already carry readOnly=false, destructive=false, idempotent=false, openWorld=true, so the safety profile is covered. The description adds real value beyond that: the call creates a template plus its first version, and by default that version is an unpublished draft unless publish=true. It doesn't mention what happens to the created template if definition validation fails, or whether the slug must be unique — a small residual gap.

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 the distinguishing fact (brand-new template + version 1) and free of filler. Minor redundancy: the instruction to fetch the definition JSON Schema with get_api_template_definition_schema repeats what the 'definition' schema description already says.

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?

For a create-with-nested-definition tool with an output schema (so return values need no explanation), the description covers the whole path: obtain schema, author, test with execute_api_template, publish in-line, or defer to the version tool. Nothing an agent needs 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% and every parameter is documented in-schema, so this is the baseline case. The description restates publish's create-then-publish meaning and points at the JSON Schema requirement for 'definition', but adds no format or constraint detail beyond 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?

States a specific verb and resource ('create a BRAND-NEW api template') plus the side effect that defines it ('mints the template + its version 1'). The parenthetical explicitly differentiates it from create_api_template_version, so an agent can route between the two 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an ordered workflow: fetch the definition JSON Schema via get_api_template_definition_schema, author against it, iterate with execute_api_template, then optionally pass publish=true. It also names the exclusion case (adding a version to an existing template → create_api_template_version), which is exactly the alternative an agent could confuse this with.

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