Apply Template
apply_templateAI-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
| Name | Required | Description | Default |
|---|---|---|---|
| templateId | Yes | Template ID from list_templates | |
| coverLetterId | Yes | Cover letter to apply | |
| variableValues | No | Confirmed template contact values, e.g. { "email_address": "jane@example.com", "phone_number": "+15551234567" }. Omit to receive needs_variables when the template requires them. | |
| selectedTemplateName | Yes | LaTeX template style key matching the template design |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| role | No | ||
| title | No | ||
| status | Yes | ||
| viewUrl | Yes | ||
| templateId | No | ||
| companyName | No | ||
| creditsUsed | No | ||
| templateName | No | ||
| coverLetterId | Yes |