Fill a template
apply_templateFill a template prompt's variables and return the resulting text, flagging missing values and unused variables.
Instructions
Fill a template prompt's {{variables}} and return the resulting text. Only prompts with isTemplate true can be applied. A placeholder with no value stays in the text as written and is named in missing; a value the template does not use is named in unused. {{name^}} inserts the value with its first letter upper-cased.
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": {
"id": "<id>"
},
"name": "apply_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of a template prompt | |
| variables | No | Values for the template variables, by name, e.g. {"module": "app"} |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| text | Yes | The template with the given values filled in | |
| unused | Yes | Values given that the template does not use | |
| missing | Yes | Placeholders left in the text because no value was given |