Skip to main content
Glama

get_template_fields

Retrieve template fields with type, constraints, and required flag. Optionally return only required fields for minimum input.

Instructions

Return the fields belonging to a single template, with full field metadata.

Closes the most common pre-assign workflow gap: instead of fetching list_template_definitions then list_field_definitions and cross-referencing client-side, this returns the template's field list directly with each field's type, constraints, and required flag inlined. Use this BEFORE assign_template to construct the fields argument.

Args: template_name: Exact template name (case-sensitive on most builds). Use list_template_definitions to discover available names. required_only: When True, return only fields where is_required is true. Useful for "what's the minimum I have to supply?" workflows.

Returns: {"template_name": <str>, "template_id": <int>, "field_count": <int>, "fields": [...]} where each field has name, field_type, is_required, is_multi_value, list_values, default_value, length, constraint.

On failure: returns {"mode": "error", "error": <slug>, ...}. Slugs: invalid_template_name when the template name doesn't exist in the repository (with the list of valid names in the response); server_error for upstream issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
template_nameYesExact template name (case-sensitive on most builds). Use list_template_definitions to discover available names.
required_onlyNoWhen True, return only fields where is_required is true — useful for 'what's the minimum I have to supply?' workflows.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, the description fully discloses behavior: return structure, field metadata details, failure slugs (invalid_template_name, server_error), and case-sensitivity. It meets the full burden for a read-only tool.

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?

Well-structured with Args, Returns, and On failure sections. Each sentence adds value, though slightly verbose. Efficient for the information density.

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 the tool's role in a broader workflow and the presence of an output schema, the description is thorough: explains return format, error handling, usage context, and links to sibling tools. No gaps.

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 baseline 3. The description adds extra context beyond the schema: clarifies case-sensitivity for template_name, suggests using list_template_definitions, and explains the required_only parameter's utility. This justifies a 4.

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 it returns fields belonging to a single template with full field metadata. It distinguishes itself from siblings like list_template_definitions and list_field_definitions by solving the cross-referencing gap.

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?

Provides explicit workflow guidance: use this BEFORE assign_template to construct the fields argument. Also mentions using list_template_definitions to discover names. Lacks explicit when-not-to-use instructions but the context is clear.

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/SamuelSHernandez/laserfiche-mcp'

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