Skip to main content
Glama
orjahren

Nettskjema MCP Server

by orjahren

get_submission_pdf

Download a Nettskjema submission by ID as a PDF, saving it to a chosen path or temporary file for offline review or archiving.

Instructions

Download a submission as a PDF file.

The PDF is written to disk, not returned inline: a multi-megabyte PDF as base64 is not useful to a model. The returned path is absolute and tilde-expanded. An existing file at the output path is silently overwritten, and its mode is preserved. A new file (whether from output_path or a temp file) is created with mode 0600 (readable only by the current user).

When output_path is omitted, a temporary file is created in the system temp directory with a .pdf suffix. The temporary file persists after this call returns and is left on disk for the caller to use or delete.

Input Schema

NameRequiredDescriptionDefault
output_pathNoDestination file path. When omitted, a temporary file is created in the system temp directory. The path may contain ~ for the home directory and may be relative (it will be resolved to an absolute path).
submission_idYesThe submission's numeric ID.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses that the PDF is written to disk rather than returned inline, that existing files are silently overwritten with mode preserved, that new files get mode 0600, and that temp files persist after return. This is exactly the behavioral context an agent needs.

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 purpose, then details. Slightly longer than necessary with some restatement of temp-file behavior repeated across the main text and schema, but no filler.

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?

For a two-parameter download tool with an output schema handling return values, the description covers the file-system side effects comprehensively. Nothing an agent needs to invoke it correctly is missing.

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 description coverage is 100%, so the baseline is 3. The description reinforces output_path's temp-file default and tilde expansion but adds little syntactic meaning beyond what the schema already documents.

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 ('Download a submission as a PDF file') that unambiguously distinguishes it from get_submission (JSON) and get_submission_metadata siblings. An agent knows exactly what it produces.

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?

The purpose implies usage, but there is no explicit when-to-use versus alternatives such as get_submission or get_answer_attachment, and no stated prerequisites or conditions. Adequate but with clear gaps.

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