Skip to main content
Glama

Apply Template

apply_template

AI-fill a LaTeX template with the cover letter content, compile to PDF, and upload to S3. Does not deduct credits. If the template has contact variables and variableValues is omitted or incomplete, returns status "needs_variables" instead of applying. Present a confirm-draft: list every required field; for status "saved" show the value and ask accept/edit; for "needs_input" ask only for that field (you may draft from suggestedVariableValues, CV/resume, or conversation — never invent). Surface privacyNote (safely stored, prompted only once), then call again with a complete variableValues map.

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": {
      "coverLetterId": "<coverLetterId>",
      "templateId": "<templateId>",
      "selectedTemplateName": "<selectedTemplateName>"
    },
    "name": "apply_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
templateIdYesTemplate ID from list_templates
coverLetterIdYesCover letter to apply
variableValuesNoConfirmed template contact values, e.g. { "email_address": "jane@example.com", "phone_number": "+15551234567" }. Omit to receive needs_variables when the template requires them.
selectedTemplateNameYesLaTeX template style key matching the template design

Output Schema

NameRequiredDescriptionDefault
kindYes
roleNo
titleNo
statusYes
viewUrlYes
templateIdNo
companyNameNo
creditsUsedNo
templateNameNo
coverLetterIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses the credit model ("Does not deduct credits"), the external side effect (upload to S3), the non-success return status "needs_variables", the privacyNote surfaced only once, and a no-fabrication policy. This is substantial behavioral context that the structured fields do not carry.

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?

The action is front-loaded in the first sentence and every clause carries operational weight; there is no filler. The second half is a dense procedural block delivered as one unbroken paragraph, which would scan better as an explicit ordered sequence of confirm-draft steps.

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?

For a multi-turn tool with a nested variableValues object and an output schema, the description covers the trigger conditions, the intermediate statuses, the interaction protocol, and the side effects. An agent has everything needed to drive both the first call and the required follow-up call correctly.

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 description coverage is 100%, so templateId, coverLetterId, selectedTemplateName, and variableValues are already documented, including the omit-to-receive-needs_variables behavior. The description reinforces the completeness requirement for the variableValues map but adds little syntax or format detail beyond the schema; it introduces suggestedVariableValues, which is a return field rather than an input. Baseline 3 applies 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.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a concrete multi-step action on a specific resource: AI-fill a LaTeX template with cover letter content, compile to PDF, and upload to S3. That pipeline is unmistakably distinct from sibling operations like create_cover_letter, regenerate_cover_letter, or export_file, so an agent can select it without opening the schema.

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?

It states exactly when the tool short-circuits (template has contact variables and variableValues is omitted or incomplete → status "needs_variables") and prescribes the follow-up protocol: present a confirm-draft, branch on "saved" vs "needs_input", surface privacyNote, then call again with a complete map. It also gives an explicit exclusion — never invent values, only draft from suggestedVariableValues, CV/resume, or conversation.

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