Skip to main content
Glama

Get template

get_template
Read-onlyIdempotent

Fetch a single template (library or caller-owned) by ID, including its full DSL source and sampleData. Mirrors GET /api/v1/templates/:id.

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": {
      "templateId": "<templateId>"
    },
    "name": "get_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
templateIdYesTemplate ID — slug for library rows (e.g. 'invoice-classic') or UUID for user rows.

Output Schema

NameRequiredDescriptionDefault
dslYesThe template's builder DSL source.
nameYesDisplay name.
tagsYesTags for filtering.
categoryYesDocument type (e.g. 'invoice'); null when uncategorised.
createdAtYesWhen the template was created, as a UTC 'YYYY-MM-DD HH:MM:SS' timestamp.
updatedAtYesWhen the template was last changed, as a UTC 'YYYY-MM-DD HH:MM:SS' timestamp.
sampleDataYesSample binding data stored with the template, or null. render_template without `data` uses the DSL's own `const sampleData`, not this.
templateIdYesTemplate ID: a slug for library templates, a UUID for your own.
descriptionYesOne-sentence summary; empty when none is stored.
ownerUserIdYesOwner's user ID, or null for a curated library template.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / sampleData / type
      Added value: +[
      +  "object",
      +  "array",
      +  "string",
      +  "number",
      +  "boolean",
      +  "null"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "category": {
      +      "description": "Document type (e.g. 'invoice'); null when uncategorised.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "createdAt": {
      +      "description": "When the template was created, as a UTC 'YYYY-MM-DD HH:MM:SS' timestamp.",
      +      "type": "string"
      +    },
      +    "description": {
      +      "description": "One-sentence summary; empty when none is stored.",
      +      "type": "string"
      +    },
      +    "dsl": {
      +      "description": "The template's builder DSL source.",
      +      "type": "string"
      +    },
      +    "name": {
      +      "description": "Display name.",
      +      "type": "string"
      +    },
      +    "ownerUserId": {
      +      "description": "Owner's user ID, or null for a curated library template.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "sampleData": {
      +      "description": "Sample binding data stored with the template, or null. render_template without `data` uses the DSL's own `const sampleData`, not this."
      +    },
      +    "tags": {
      +      "description": "Tags for filtering.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "templateId": {
      +      "description": "Template ID: a slug for library templates, a UUID for your own.",
      +      "type": "string"
      +    },
      +    "updatedAt": {
      +      "description": "When the template was last changed, as a UTC 'YYYY-MM-DD HH:MM:SS' timestamp.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "templateId",
      +    "ownerUserId",
      +    "name",
      +    "description",
      +    "category",
      +    "tags",
      +    "createdAt",
      +    "updatedAt",
      +    "dsl",
      +    "sampleData"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuine context beyond that: the payload includes the full DSL source and sampleData, and it maps onto GET /api/v1/templates/:id, letting an agent predict the response shape and cross-reference REST docs. Return-value explanation is unnecessary given the output schema exists.

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?

A single front-loaded sentence that identifies the resource, the scope, the payload contents, and the REST equivalent with zero filler. Nothing could be removed without losing information.

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 one-parameter read tool with full schema coverage, annotations, and an output schema, the description covers the essentials. The only real omission is behavior on an invalid or unknown templateId (error vs empty), which is a minor gap at this complexity level.

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 coverage is 100% and the schema itself already explains slug-for-library vs UUID-for-user rows. The description's 'library or caller-owned' restates that distinction rather than adding new meaning such as format validation or behavior on a missing ID. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

States a specific verb (Fetch) and resource (a single template) scoped by ID, and clarifies the response includes the full DSL source and sampleData — which distinguishes it from render_template (produces output) and list_templates (many rows). It does not name a sibling explicitly, so sibling differentiation is implied rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The phrase 'full DSL source and sampleData' implies you call this when you need the raw template definition rather than rendered output, but there is no explicit when-to-use or when-not-to-use statement and no alternative tool is named. Usage is inferable from the sibling set but not spelled out.

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