add_template_to_library
Add a new template to your user library, automatically assigning the correct ID so templates stay reachable and the library list remains stable.
Instructions
Add a new template to the user's library (never writes into the bundled seed dir).
Always sets metadata["id"] to template_id, overriding whatever (if
anything) the caller passed for "id" -- this is what get_template_files
matches on, so a missing or mismatched "id" would silently make the
template unreachable (or crash list_templates() entirely if "id" is
missing), which happened for real once already.
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": {
"template_id": "<template_id>",
"metadata": "<metadata>",
"files": "<files>"
},
"name": "add_template_to_library"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | ||
| metadata | Yes | ||
| template_id | Yes | ||
| user_library_dir | No | /root/.paperpilot/templates |