Skip to main content
Glama

get_user_template

Read-only

Return the PDF template this user has saved, or a 404 if they have none.

Call it to answer "what format am I on?", BEFORE `save_user_template` when a
template may already exist (saving replaces it without history, so the user
should know what they are overwriting), and whenever you are about to compose
a PDF yourself from Flexreport data: lay the content out in this markup so the
document matches the user's format. A 404 there is the cue to offer drafting
one (`draft_user_template` -> previews -> `save_user_template`).

Returns {"template_type", "template_format", "anchor", "template", "created_at",
"updated_at"}. `template` is the sanitized markup as submitted (up to 200 KB) —
the compiled blueprint the backend renders from is not returned. To change the
format, draft again and pass the chosen variant to `update_user_template`
rather than editing this text blind.

An HTTP 404 means no template is saved — the standard layouts are in force. An
HTTP 503 means the backend's user_templates table has not been created yet, NOT
that nothing is saved; report that difference.

Requires auth (your MCP client attaches the OAuth bearer automatically).
Rate-limited 100/min.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
anchorNoSection an add_on applies to; null for bespoke.
templateNoThe sanitized markup as submitted (up to 200 KB).
created_atNo
updated_atNo
template_typeNo"add_on" or "bespoke".
template_formatNo"html".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description adds substantial context beyond that: the 404-vs-503 semantic distinction, the auth requirement, the 100/min rate limit, the fact that save replaces without history, and that the returned template is sanitized markup capped at 200 KB while the compiled blueprint is withheld.

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-loads the return value and the primary usage trigger, then layers routing guidance and edge cases. Most sentences earn their place, though the enumerated Returns listing partially duplicates the output schema and could be trimmed slightly.

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?

Given an output schema exists, return values needn't be spelled out, yet the description adds the useful nuance that the compiled blueprint is not returned and the 200 KB cap. Combined with auth, rate-limit, and error-code semantics, nothing an agent needs to call this correctly is missing.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies. No parameter detail is needed or missing.

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+resource (returns the user's saved PDF template) and immediately distinguishes it from sibling tools like save_user_template, draft_user_template, and update_user_template. The one-line opener plus the 404 case makes the tool's identity unambiguous.

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?

Explicitly names three triggering scenarios (answering 'what format am I on?', before save_user_template because saving replaces without history, and before composing a PDF so the markup matches). It also names alternatives (draft_user_template, update_user_template) and gives the conditional cue that a 404 is the signal to offer drafting.

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