Skip to main content
Glama
orjahren

Nettskjema MCP Server

by orjahren

get_spss_syntax

Read-only

Retrieve SPSS syntax for a Nettskjema form's submission data as JSON, with a configurable character cap and truncation flag to control context size.

Instructions

Get SPSS syntax for a form's submission data.

The spec documents this route's response as an SPSS syntax file. The syntax is returned as JSON with a size signal and truncation flag. The result is capped at max_chars (default 1,000,000) to bound context size: check the truncated field to see if the full syntax was cut.

Input Schema

NameRequiredDescriptionDefault
form_idYesThe form's numeric ID.
max_charsNoMaximum characters to return. Defaults to this MCP server's configured limit (1,000,000). When the cap is reached, the text is cut at the last complete newline before the limit and truncated is set to true. The caller may raise this limit arbitrarily by passing a larger value.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, the description discloses real behavioral traits: the response is JSON wrapping the syntax, it carries a size signal and a truncation flag, and output is capped at max_chars. The caller is told to check 'truncated' to detect a cut response, which is genuinely useful operational context.

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 core capability and the truncation caveat are front-loaded and the passage is short. The middle sentence about what 'the spec documents' is slightly meta and redundant with the first sentence, costing a little efficiency.

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 an output schema present and readOnlyHint declared, the description need not explain return values; it still adds the one thing the schema cannot convey — the truncation risk and how to detect it. Nothing needed to call this 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 coverage is 100%, so both form_id and max_chars are already documented in the schema, including the default and the newline-boundary truncation rule. The description restates the max_chars cap and truncation behavior without adding syntax or format detail the schema lacks, 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?

States a specific verb and resource: 'Get SPSS syntax for a form's submission data,' which an agent can distinguish from CSV/Excel export siblings. It does not explicitly name those alternatives, so sibling differentiation is left implicit.

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 (retrieve syntax for statistical use on a form's data) but there is no explicit when-to-use, when-not-to-use, or guidance against the nearby export_form_csv / export_form_excel siblings. An agent must infer the choice from the format name alone.

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