Skip to main content
Glama

attach_template_asset

Destructive

Bind a named image to a template. Required: template_id (or key), name (the placeholder, e.g. LOGO_B64), document_id (a file already uploaded via upload_document / create_document_upload_url). The NAME is the interface, not the storage path — so the file behind it can be replaced without touching the template.

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": {
      "name": "<name>",
      "document_id": "<document_id>"
    },
    "name": "attach_template_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoTemplate key, alternative to template_id
nameYesPlaceholder name the image is bound to in the template, e.g. LOGO_B64
document_idYesID of the document
template_idNoID of the template

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / document_id / description
      Added value: +"ID of the document"
    • addedInput schema / properties / key / description
      Added value: +"Template key, alternative to template_id"
    • addedInput schema / properties / name / description
      Added value: +"Placeholder name the image is bound to in the template, e.g. LOGO_B64"
    • addedInput schema / properties / template_id / description
      Added value: +"ID of the template"
  2. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false. The description adds useful conceptual context — the name is the binding interface and the underlying file can be swapped later — but it never says what the destructive part is, i.e. whether rebinding an existing placeholder replaces or errors, or whether the prior document link is lost.

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 action, then the required inputs, then one clarifying sentence about indirection. Every sentence carries information, though the final sentence is slightly longer than needed to make the point that the placeholder name decouples binding from storage.

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 four-parameter mutation with no output schema, the description covers purpose, prerequisites, and the key semantic distinction an agent could get wrong (name vs. file). The remaining gap is failure/overwrite behavior, which matters given destructiveHint=true but is a modest omission overall.

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 100%, so the baseline is 3, and the description earns above that: it explains that template_id and key are alternatives, that name is the in-template placeholder (with a concrete LOGO_B64 example), and that document_id must come from the upload flow rather than being an arbitrary path.

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: 'Bind a named image to a template.' It also separates this action from the upload step by naming upload_document / create_document_upload_url as the place the file comes from, so the agent can tell which sibling performs which half of the workflow.

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?

Gives a clear precondition — the document must already be uploaded via upload_document or create_document_upload_url — which is exactly the context needed before calling. It stops short of naming when-not-to-use or what happens if a name is already bound, so it is clear context rather than a full routing rule.

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.