Skip to main content
Glama

Edit a PDF by instruction

smart_edit

Describe the change ("remove the blank pages, number the rest and make it PDF/A"): FynePDF plans the steps from its actions, checks the plan, and runs it. With run false it only returns the plan.

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": {
      "instruction": "<instruction>"
    },
    "name": "smart_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
runNoDefault true.
fileNoA file the person attached in ChatGPT (filled in by ChatGPT).
file_idNoA FynePDF file_id from upload_file, import_file_from_url or an earlier tool.
file_urlNoA public link to the file.
instructionYes
library_file_idNoA file from the person's FynePDF Library (from list_library_files).

Output Schema

NameRequiredDescriptionDefault
cardNo
planYes
filesNo
stepsNo
job_idNo
statusNo
creditsNo
messageYes
explanationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • removedOutput schema / properties / files / items / properties / bytes / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / files / items / properties / bytes / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / files / items / properties / download_url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / files / items / properties / download_url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / files / items / properties / pages / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / files / items / properties / pages / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / steps / items / properties / bytes_after / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / steps / items / properties / bytes_after / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / steps / items / properties / bytes_before / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / steps / items / properties / bytes_before / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / steps / items / properties / pages_after / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / steps / items / properties / pages_after / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / steps / items / properties / pages_before / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / steps / items / properties / pages_before / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and non-idempotency; the description adds a meaningful behavioral trait beyond that — an internal plan/verify/execute pipeline with a dry-run mode. It still does not say whether the original file is modified or a new artifact is produced, nor how multi-step plans behave if one step fails.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences: the first front-loads a worked example that illustrates the expected instruction style and scope, the second flags the dry-run switch. No filler, and the most decision-relevant detail (plan preview) closes the text.

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?

An output schema exists, so return shape need not be described, and annotations cover the safety profile. What is missing for a 6-parameter mutation tool with a nested file object is guidance on which file-input parameter to supply and whether the edit yields a new file or overwrites the source.

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 83%, so the schema carries most parameter meaning and the baseline is 3. The description does add real value for `run` (the schema only says "Default true"), explaining that false returns only the plan, but it says nothing about choosing among file, file_id, file_url and library_file_id or about the nested file object.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description pairs a concrete verb (edit) with a concrete resource (a PDF) and defines the input mode precisely: a natural-language instruction that FynePDF converts into a checked, executable plan. An agent can tell this apart from mechanical siblings like edit_pages or split_pdf, though no sibling is named explicitly.

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?

It gives a clear usage mode — describe the change in prose, and set run=false to preview the plan before executing — which is genuinely actionable context. However it never states when to pick this over sibling tools such as edit_pages, compress_pdf, convert_to_pdf or redact_pdf, so tool selection still requires inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.