Skip to main content
Glama
cups-sane-mcp

cups-sane-mcp

by ispb88

print_file_data

Prints a tiny file supplied as base64—such as PDF, image, PostScript, or plain text—using specified CUPS options like copies, duplex, page ranges, paper, quality, and scaling.

Instructions

Print a small file sent as base64 (only for tiny files: every byte costs tokens). Prefer get_upload_link + print_file for files, or print_text for plain text. Prints PDF, PostScript, PNG, JPEG, TIFF or plain text. Print options (all optional): copies, duplex, page_ranges ("1-3,5"), paper, quality, printer; scaling: auto (shrink only if too big), fit (fit the page, keep proportions), fill (fill the page, crop overflow), none (actual size). Usually fit for photos and screenshots, and left unset (printer default) for documents; ppi: override an image's resolution; options: other CUPS options such as {"InputSlot": "Manual", "number-up": "2"}; printer_options lists what the printer accepts.

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": {
      "data_base64": "<data_base64>"
    },
    "name": "print_file_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
ppiNo
paperNo
copiesNo
duplexNo
optionsNo
printerNo
qualityNo
scalingNo
filenameNodocument.pdf
data_base64Yes
page_rangesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does most of it: it discloses the token-cost tradeoff of base64 vs upload, the supported input formats (PDF, PostScript, PNG, JPEG, TIFF, plain text), and the semantic effect of each scaling mode including cropping ('fill ... crop overflow'). It does not state whether printing requires a configured/default printer, what happens on printer failure, or that the call has a physical side effect — gaps that keep it off a 5.

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 key constraint (tiny files, token cost) before the alternative routing, then a compact grouped list of options. It is dense with little waste, though the mid-paragraph wrapping of the scaling list and the trailing options sentence make it slightly harder to scan than a clean bulleted structure would be.

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 11-parameter, unannotated tool the description covers nearly everything an agent needs to call it correctly, and an output schema exists so return values need not be explained. Minor omissions remain: the filename default and whether a printer must be pre-configured or defaults to a system printer.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does: page_ranges gains a concrete format example ("1-3,5"), scaling's four enums are each defined (auto = shrink only if too big, fit = keep proportions, fill = crop overflow, none = actual size), ppi is explained as an image-resolution override, and options is illustrated with a real CUPS example plus a pointer to printer_options. Only filename and data_base64 are left implicit, and both are largely self-explanatory.

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 ('Print a small file sent as base64') and immediately scopes it ('only for tiny files'), then names the siblings it is not for (get_upload_link + print_file, print_text). An agent can distinguish this from print_file and print_text without opening any schema.

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?

Explicit routing: use this only for tiny payloads because 'every byte costs tokens', otherwise use get_upload_link + print_file for files or print_text for plain text. It also gives per-case guidance for scaling ('Usually fit for photos and screenshots, and left unset (printer default) for documents'), which is genuine when-to-use advice rather than a restatement.

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