Skip to main content
Glama

Stage PDF for Upload

prepare_application_pdf_upload
Idempotent

Prepare an application's rendered PDF for Playwright upload by staging a disposable copy and returning its absolute file path; renders it first if missing.

Instructions

Stage a disposable copy of an application's canonical rendered PDF for direct Playwright upload. If the PDF has not been rendered, render it and retry once. Writes atomically under $MAESTRO_CS_UPLOAD_DIR/<application_id>/, defaulting to the repository's .playwright-mcp/uploads directory (pair Playwright --output-dir with the parent .playwright-mcp tree). Returns upload_path, an absolute path usable directly by Playwright's file chooser. The staged copy is the only location intended for browser file uploads; the canonical server artifact (under applications/artifact_dir) is preserved and is not an upload source. Also returns filename/path integrity and PDF lint metadata. This preparation tool does not authorize or submit an application.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
application_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=true, and the description is consistent with all of them while adding real behavioral detail: atomic write, deterministic path layout, default directory, render-and-retry-once fallback, and that it returns integrity/lint metadata. It also states the safety boundary (no authorization or submission), which annotations alone would not convey.

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 consumer, then layers useful operational detail (paths, retry, return value). It is longer than typical but nearly every sentence carries non-redundant information; only the canonical-vs-staged point is restated in slightly different words.

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?

With no output schema, the description correctly documents return values (upload_path, filename/path integrity, PDF lint metadata). Combined with retry semantics, path conventions, and the explicit non-authorization boundary, an agent has everything needed to call and correctly interpret this tool.

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 0% and there is one parameter, but the description shows the parameter's role by embedding it in the output path template ($MAESTRO_CS_UPLOAD_DIR/<application_id>/<canonical filename>). It also documents the returned upload_path despite having no output schema, compensating well for a trivially simple single-argument signature.

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 ('Stage a disposable copy of an application's canonical rendered PDF') and specifies the exact consumer (direct Playwright upload). It is clearly distinguishable from siblings like render_pdf, get_rendered_pdf, and mark_submitted, and it explicitly declares the boundary that it does not submit.

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 context for use (Playwright file chooser upload) and an explicit when-not: the canonical server artifact under applications/artifact_dir 'is preserved and is not an upload source.' It also gives the paired configuration hint (--output-dir with the parent .playwright-mcp tree). It stops short of naming the alternative tool for users who just want the canonical PDF, so not a full 5.

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

Deploy Server

Other Tools