Skip to main content
Glama

Extract a format from example files

extract_format

Derives a reusable formatting skill from .xlsx, .pptx, and screenshot examples by extracting style tokens, then previews or saves the skill for consistent document and deck creation.

Instructions

Derive a formatting skill from examples: .xlsx and .pptx files are parsed into style tokens, screenshots come back as images for you to read. Call it once with no save to see what was recovered and what has to be asked, pass your reading of any screenshots back as observations, then call again with save: true to write ~/.claude/skills//SKILL.md and, for deck tokens, the builder sidecar. fromSkill derives deck tokens for a prose-only skill instead of from files.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "extract_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoWhich half to derive; files of the other kind are ignoredboth
nameNoStyle name. The skill directory is its slug. Required to save
saveNofalse: preview only. true: write the SKILL.md and the deck tokens sidecar
pathsNoAbsolute paths to examples: .xlsx, .pptx, .png, .jpg. Pass paths as the user gave them; never base64
fromSkillNoName of an existing skill (e.g. harbor-deck) to derive tokens for. Returns its prose; send observations back to write its sidecar
overwriteNoReplace an existing skill directory of the same name
descriptionNoOne line for the skill's front matter: when to use this style. Written for you if omitted
observationsNoYour reading of the screenshots in the extractor's schema (docs/skill-format-block.md). A field a file read at 0.8 or better wins; the rest is yours.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.3

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does most of it: it names the write target (~/.claude/skills/<name>/SKILL.md plus the builder sidecar for deck tokens), states that save: false is a preview, and explains that screenshots are returned as images for the agent to interpret. It does not discuss what overwriting an existing skill directory destroys or how failures surface, which the schema hints at but the description leaves implicit.

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?

Three sentences, front-loaded with the purpose and follow-on workflow rather than burying it. The middle sentence is long and carries several clauses (preview, observations, save target, sidecar), but every clause conveys distinct operational information rather than padding.

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?

For an 8-parameter, nested-object tool with no output schema and no annotations, the description covers the round-trip lifecycle, where artifacts land, and how screenshot content flows back in. It stops short of describing the preview payload's shape or the failure mode when name is omitted with save: true.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description adds real meaning on top by explaining save as the pivot between preview and write, framing observations as the agent's screenshot reading (with the precedence rule that file-derived fields at 0.8+ win), and clarifying that fromSkill substitutes for paths. Remaining parameters (kind, name, description, overwrite, evidence, unknowns) are left entirely to the schema.

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?

"Derive a formatting skill from examples" gives a specific verb and artifact, and the description then differentiates the input classes (.xlsx/.pptx parsed into style tokens vs. screenshots returned as images). An agent can tell this apart from build_/restyle_ siblings, which consume styles rather than derive them.

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?

The two-pass protocol is spelled out: call once with no save to inspect what was recovered and what must be asked, feed screenshot readings back as observations, then call again with save: true. fromSkill is given its own triggering condition (prose-only skill needing deck tokens). No explicit when-not-to-use relative to sibling style tools, which keeps it just short of a 5.

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