Skip to main content
Glama
orjahren

Nettskjema MCP Server

by orjahren

export_form_excel

Export a Nettskjema form's submission data to an Excel file written to disk. Provide form_id and optional output_path; returns absolute path or temp file.

Instructions

Export a form's submission data to a file, written to disk.

The spec documents this route's response as an Excel file. The file is streamed to disk and never inlined: a multi-megabyte spreadsheet as base64 is useless 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 suffix derived from the response's media type. The temporary file persists after this call returns and is left on disk for the caller to use or delete.

Input Schema

NameRequiredDescriptionDefault
form_idYesThe form's numeric ID.
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).
optimize_for_large_dataNoRequest optimization for large datasets.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 behavioral burden and does so thoroughly: streamed-to-disk rather than inlined, absolute tilde-expanded paths, silent overwrite of existing files, mode preservation, 0600 for new files, and the temp file's post-call lifecycle. These are exactly the destructive/permission details an agent needs and cannot get anywhere else.

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?

Three tight paragraphs, front-loaded with the core action before the disk semantics. Every sentence carries substantive information; the density is high but nothing reads as 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?

An output schema exists, yet the description still covers the returned path semantics, and it fully compensates for the absent annotations on the write side. For an export-to-disk tool the agent knows the destination, the overwrite risk, and the file lifecycle before calling.

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 100%, so the baseline is 3. The description goes beyond the schema by explaining the concrete consequence of omitting output_path (temp file in the system temp dir, suffix from media type) and the overwrite/mode behavior at that path; form_id and optimize_for_large_data gain nothing beyond the schema.

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?

States a specific verb and resource ('Export a form's submission data to a file, written to disk') and identifies the output format as an Excel file, which implicitly separates it from the sibling export_form_csv without naming it. Slightly short of 5 because the alternative is never named outright.

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?

Gives useful operational context (what happens when output_path is omitted, where the temp file lands), but never states when to prefer this tool over export_form_csv or get_form_answers. Usage is implied by the format rather than explicitly routed.

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