Skip to main content
Glama
orjahren

Nettskjema MCP Server

by orjahren

get_form_answers

Read-only

Export all answers from a Nettskjema form as newline-delimited JSON, with optional question filters and row limits to keep large datasets manageable.

Instructions

Stream all answers for a form, as newline-delimited JSON.

This exports every answer on the form, one JSON object per line (NDJSON), so a large form's answers are never held whole in memory. Filter by element_ids to export only specific questions. The result is capped at max_rows (default 1000) to bound context size: check the returned truncated field to see if more data exists. When truncated is true, the reason field distinguishes a hit row cap ("rowCap") from a connection that closed mid-line ("incompleteFinalLine").

Input Schema

NameRequiredDescriptionDefault
form_idYesThe form's numeric ID.
max_rowsNoMaximum number of rows to return. Defaults to this MCP server's configured limit (1000). When the cap is reached, truncated is set to true and reason is "rowCap". The caller may raise this limit arbitrarily by passing a larger value.
element_idsNoList of element IDs to filter by. When provided, only answers for these elements are returned. Sent as repeated query parameters (element-ids=1&element-ids=2&...).
optimize_for_large_dataNoRequest optimization for large datasets.
submission_ids_greater_thanNoOnly include answers from submissions with IDs above this value.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior5/5

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

With readOnlyHint=true already declaring safety, the description goes well beyond annotations: it discloses the streaming NDJSON framing (one object per line), the default 1000-row cap, and the truncated/reason output contract including the 'rowCap' vs 'incompleteFinalLine' distinction. That is exactly the kind of operational behavior an agent needs to handle partial results correctly.

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 primary purpose is front-loaded in the first sentence, followed by progressively finer detail on framing, filtering, and truncation. It is dense but each clause carries information; only the NDJSON restatement is mildly redundant.

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?

An output schema exists, so return values need not be described, yet the description usefully explains the truncated/reason fields an agent must branch on. Combined with full schema coverage and a readOnly annotation, this is sufficient for a streaming read tool; only the sibling-export distinction is left unaddressed.

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 schema already documents form_id, max_rows, element_ids, and the rest in detail. The description largely restates those semantics (filter via element_ids, cap via max_rows) rather than adding new syntax or interaction detail, so the baseline 3 applies.

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?

The opening sentence states a specific verb (stream/export) and resource (all answers for a form) plus the exact wire format (newline-delimited JSON). It is unambiguous about what the tool produces. However, it does not differentiate itself from sibling exporters like export_form_csv or export_form_excel, which also export form answers, leaving the agent to infer the difference from format alone.

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?

Usage is implied rather than stated: the note that answers are 'never held whole in memory' and the max_rows cap signal this is the choice for large-form streaming, and element_ids is offered for question-scoped exports. But there is no explicit when-to-use versus the CSV/Excel export siblings, and no stated prerequisites or exclusions.

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