Skip to main content
Glama

Pages: fill placeholders

pages_fill_placeholders
Destructive

Fill tagged placeholders in Apple Pages templates with values, preserving formatting; use dry_run to preview changes on a copy before editing the file.

Instructions

Fill template placeholders by tag, e.g. {"Name": "Sara", "Date": "3 October"}. Formatting is kept; the body is verified to change only there. Needs macOS + Pages. dry_run=true previews the change on a copy without touching the file. Use for template fields (Name, Date). It's the only write for page-layout documents like letters and flyers, which have no body text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the .pages document (absolute, or starting with ~).
valuesYesPlaceholder tag → text, e.g. {"Name": "Sara", "Date": "3 October"} (tags from pages_list_placeholders).
dry_runNotrue = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.4.1
    • addedInput schema / properties / dry_run / description
      Added value: +"true = make the change on a throwaway copy, run every check, and return what would change; the file itself is not touched. Use it before broad or risky edits and show the user."
    • addedInput schema / properties / path / description
      Added value: +"Path to the .pages document (absolute, or starting with ~)."
    • addedInput schema / properties / values / description
      Added value: +"Placeholder tag → text, e.g. {\"Name\": \"Sara\", \"Date\": \"3 October\"} (tags from pages_list_placeholders)."
  2. First observedv2.4.0

TDQS

A4.1/5.0
Behavior4/5

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

Adds meaningful behavior beyond the annotations: formatting is preserved, the body is verified to change only at placeholders, macOS + Pages is required, and dry_run previews on a throwaway copy. The destructiveHint=true annotation is consistent with a write tool, and the description reinforces the safe-preview path rather than contradicting it.

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?

Front-loaded with the core action and its example, then layered with verification, platform, dry-run, and use-case notes. Every sentence carries information, though the example values could be trimmed since it duplicates the schema.

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

Completeness4/5

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

With an output schema present, return details need not be explained, and the description covers the remaining essentials: platform requirement, verification guarantee, dry-run semantics, and the document class it targets. Complete enough for correct invocation.

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 coverage is 100%, so the parameter baseline is 3. The description's example values object and dry_run explanation largely restate what the schema already documents, so it adds little parameter-level meaning beyond the structured fields.

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?

States a specific verb and resource ('Fill template placeholders by tag') and immediately differentiates from siblings by noting it is 'the only write for page-layout documents like letters and flyers, which have no body text.' The agent can distinguish it from pages_set_body and pages_replace_all without opening schemas.

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

Usage Guidelines4/5

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

Gives clear when-to-use context ('Use for template fields (Name, Date)') and a useful scoping contrast against body-text edits. It also explains the dry_run workflow. It stops short of naming specific alternative tools (e.g. pages_replace_all) for related edits, so it is strong context rather than explicit routing.

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