Skip to main content
Glama

View PDF

view_pdf
Read-onlyIdempotent

Display an already-uploaded PDF in an interactive viewer widget.

Call this after delete_pdf_page, set_password, change_password, redact_pii, and redact_by_text_range to show the updated PDF. Also call when the user explicitly asks to (re-)display a specific PDF.

AFTER AN UPLOAD — this is the step that is most often skipped:

  • After upload_pdf / batch_upload_pdf (ChatGPT file attachment): those tools show NOTHING on screen. If the user asked to see, open, view, read, or display the document, you MUST call view_pdf now — the upload alone does not display it.

  • After create_upload_page (widget upload): do NOT call view_pdf. That widget renders the PDF itself.

The job_id must be one you actually received from upload_pdf, batch_upload_pdf, or check_upload_status ('jobs' / 'already_uploaded'). NEVER invent a job_id and never pass a filename as job_id. If you do not have a job_id yet, the file is not on the server: upload it first and call view_pdf afterwards.

MANDATORY after this tool returns:

  1. Render a markdown download link so the user can save the file: Download {filename}

  2. Follow cta_instruction and append cta_text at the end of your reply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idNoJob ID of the PDF to display (use the latest job_id).
session_idNoSession ID that the job belongs to.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes
statusYes
pdf_urlYes
cta_textYes
filenameYes
reply_noteYes
session_idYes
download_urlYes
instructionsYes
schema_versionYes
cta_instructionYes

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false. The description adds substantial behavioral context not available in annotations: the upload tools show nothing and require this call, create_upload_page self-renders and must not be followed by view_pdf, the job_id must originate from specific tools, and there are mandatory post-conditions (render download link, follow cta_instruction). This goes well beyond the annotation safety profile.

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 longer than average but well-structured with clear sections, bolded emphasis, and bullet points. Each paragraph serves a distinct purpose: core definition, usage triggers, upload caveat, job_id constraints, and post-conditions. While lengthy, the information density is high and layout improves scannability; a slight trim could make it a 5.

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

Completeness5/5

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

Given the tool's complexity (interaction with upload flow, job_id provenance, post-conditions), the description covers all necessary context. It addresses common mistakes (forgetting to call after upload, inventing job_id), specifies the exact call sequence, and provides mandatory follow-up actions. The output schema exists, so return value details are not needed in the description.

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?

The schema already describes both parameters with 100% coverage, giving names and brief descriptions. The description adds critical semantics for job_id: it must come from upload_pdf, batch_upload_pdf, or check_upload_status; never invent or use a filename. This is valuable beyond the schema, though session_id receives no additional detail. With high schema coverage, baseline 3, and added job_id guidance, a 4 is appropriate.

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 opens with 'Display an already-uploaded PDF in an interactive viewer widget,' which uses a specific verb ('display') and resource ('already-uploaded PDF') and clearly differentiates from siblings like upload_pdf and create_upload_page. It explicitly notes the upload tools show nothing, reinforcing the unique purpose.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance: after delete_pdf_page, set_password, change_password, redact_pii, redact_by_text_range, and when the user asks to re-display. It also covers when NOT to call (after create_upload_page) and warns that after upload_pdf/batch_upload_pdf you MUST call view_pdf, giving clear conditional logic and alternatives.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: uploads are split by context (single, batch, widget), content inspection is split by method (text, images, redaction lines), and password operations are split by state (set vs change). Descriptions explicitly cross-reference to prevent confusion.

Naming Consistency4/5

All tools start with a verb (upload, check, compare, compress, create, delete, get, list, redact, set, change, view), but the position of 'pdf' varies (suffix in compress_pdf, middle in get_pdf_info) and some names are compound like 'batch_upload_pdf' and 'get_latest_comparison'. Pattern is readable but not perfectly uniform.

Tool Count4/5

16 tools is slightly above the ideal 3-15 range, but each tool maps to a distinct operation or workflow step in PDF handling. The count feels justified given the breadth of features (upload, compress, delete, password, redact, compare).

Completeness4/5

The surface covers the core PDF lifecycle: upload, view, compress, delete pages, password protection, redaction, and comparison. Minor gaps exist (no merge, split, or rotate), but the primary workflows are fully supported with mandatory pre/post checks.