Skip to main content
Glama

Apply Template

apply_template

Insert a resolved builtin component package into an existing project. Pass template as the selected builtin id and body with projectId, the resolved documentSha256, insert:{startTime,idPrefix}, parameter values and explicit media bindings. Read get_composition first and retain expectedRevision, commandId, componentExecutionVersions:[3,4] and expectedBrandIdentity as required by the contract. Insertion preserves existing timeline content and package source offsets. Select pinned samples explicitly with media:{slot:{sample:true}}, or bind real media IDs. Missing required media is refused; samples are never selected implicitly. A stale revision, pin or brand refuses; do not silently refresh the witness. For ordinary templates, this operation retains its existing apply behavior.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
templateYestemplate (path).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
etagNo
versionNo
projectIdNo
versionIdNo
componentsNo
templateIdNo
compositionIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / body / properties / componentExecutionVersions / anyOf
      Added value: +[
      +  {
      +    "items": false,
      +    "maxItems": 1,
      +    "minItems": 1,
      +    "prefixItems": [
      +      {
      +        "const": 3,
      +        "type": "number"
      +      }
      +    ],
      +    "type": "array"
      +  },
      +  {
      +    "items": false,
      +    "maxItems": 2,
      +    "minItems": 2,
      +    "prefixItems": [
      +      {
      +        "const": 3,
      +        "type": "number"
      +      },
      +      {
      +        "const": 4,
      +        "type": "number"
      +      }
      +    ],
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / body / properties / componentExecutionVersions / items
      Removed value: -{
      -  "const": 3,
      -  "type": "number"
      -}
    • removedInput schema / properties / body / properties / componentExecutionVersions / maxItems
      Removed value: -1
    • removedInput schema / properties / body / properties / componentExecutionVersions / minItems
      Removed value: -1
    • removedInput schema / properties / body / properties / componentExecutionVersions / type
      Removed value: -"array"
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Despite annotations already declaring the non-idempotent, non-destructive write profile, the description adds substantial context: it preserves existing timeline content and package source offsets, refuses missing required media, never selects samples implicitly, and refuses (rather than silently refreshing) on stale revision/pin/brand. These are exactly the operational behaviors an agent needs before mutating a project.

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?

It is front-loaded with purpose, then parameters, then refusal semantics, and most sentences carry real information. The closing line ("For ordinary templates, this operation retains its existing apply behavior") is vague filler and the prose is dense/choppy, keeping it from a 5.

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?

An output schema exists so return values needn't be explained, and the description covers prerequisites, the parameter contract, and failure modes — a lot for a complex nested tool. It still leans on undefined references ("the contract", "the witness"), leaving minor ambiguity about the revision/pin protocol.

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

Parameters4/5

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

Schema coverage is only 50% and the body is a deep nested object, so the description must compensate. It does: it explains that template is the selected builtin id, enumerates body fields (projectId, documentSha256, insert:{startTime,idPrefix}, values, media bindings), and clarifies the media convention media:{slot:{sample:true}} vs real media IDs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: "Insert a resolved builtin component package into an existing project." This is far more precise than the name alone and implicitly separates it from apply_composition and start_template. It stops short of naming a sibling explicitly, so it lands at 4 rather than 5.

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 gives a clear precondition — "Read get_composition first and retain expectedRevision, commandId, componentExecutionVersions:[3,4] and expectedBrandIdentity" — which tells the agent how to prepare the call. However, it never states when to prefer this over apply_composition/start_template or when not to use it, so it lacks explicit exclusions.

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.