Skip to main content
Glama
sjgod1427

PaperPilot

by sjgod1427

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
metadataYes
template_idYes
user_library_dirNo/root/.paperpilot/templates

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that the tool never writes to the seed dir, always overrides metadata['id'], and explains the consequence of a missing/mismatched id. However, it does not mention whether an existing template with the same id is overwritten, which could be a destructive side effect.

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 description is concise with a clear first sentence stating the purpose. The second paragraph is slightly verbose due to the historical anecdote, but it remains focused on a critical behavioral detail. Overall structure is effective and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the key behavioral nuance (id override and seed dir safety) but omits return value, error conditions, and whether existing templates are overwritten. Given the tool's complexity and lack of output schema, this feels incomplete for an agent that needs to handle edge cases.

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?

The description adds meaningful detail for template_id and metadata (explaining the id override), but files and user_library_dir are not elaborated beyond the schema. Since schema coverage is 0%, the description only partially compensates for the missing parameter documentation.

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 the action — 'Add a new template to the user's library' — and distinguishes it from the bundled seed directory. It also implies the tool's role in relation to get_template_files, making the purpose unambiguous and differentiated from siblings like write_file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by referencing get_template_files and the library location, but it does not explicitly name alternatives or specify when to choose this tool over write_file or list_templates. The guidance is indirect rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.