Skip to main content
Glama

Create a template

lob_templates_create
Idempotent

Create reusable HTML templates for mail pieces, supporting Handlebars variables for dynamic content substitution.

Instructions

Create a reusable HTML template that can be referenced by ID (tmpl_…) when creating mail pieces. Supports Handlebars-style {{variables}} for runtime substitution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo
htmlYesHTML content of the template (UTF-8).
engineNoTemplate engine. Defaults to 'handlebars'.
metadataNoUp to 20 string key/value pairs of arbitrary metadata to attach to the resource.
extraNoAdditional Lob API parameters not enumerated above. Merged into the request body verbatim. See https://docs.lob.com for the full parameter list per resource.
Behavior4/5

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

Annotations already indicate idempotency and non-destructiveness. The description adds behavioral context: templates are reusable, get a tmpl_ ID, and support Handlebars variables. This goes beyond annotations but does not detail authentication or rate limits; still adequate for a creation tool.

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?

Two sentences with zero filler. Front-loaded with the action ('Create a reusable HTML template') and immediately provides key details. Every sentence earns its place.

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?

The description covers the essential usage: creation, ID pattern, variables, and engine. It does not explicitly mention the 'extra' parameter (open world) or return values, but the annotations and schema fill those gaps. For a creation tool without output schema, this is sufficient.

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 high (80%), but the description adds meaningful context: it explains the purpose of the template (reusable, referenced by ID) and the variable substitution mechanism, which enriches understanding of the html and engine parameters. The description does not need to repeat schema details.

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?

The description clearly states the action (create), the resource (reusable HTML template), and the context (referenced by ID for mail pieces, supports variables). It effectively distinguishes from sibling tools like lob_templates_search and lob_templates_update.

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?

The description implies when to use this tool (for creating top-level templates) by mentioning 'reusable HTML template' and referencing the ID pattern. However, it does not explicitly contrast with lob_template_versions_create, which could be confusing. Overall, clarity is good but lacks explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/optimize-overseas/lob-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server