Skip to main content
Glama

More AI - ChatGPT & Claude MCP (Fortnox)

Läs innehållet i ett dokument

read_fortnox_document
Read-onlyIdempotent

Returns the text of a Fortnox document for you to read, chosen by operation_id: an invoice, offer or order PDF (InvoiceController_doShowAndPreview, OfferController_doShowAndPreview or OrderController_doShowAndPreview, path_params DocumentNumber), an SIE (the Swedish standard file format for accounting data) file (SieController_doShow, path_params Type 1–4, query_params financialYear), or a file from the archive (ArchiveController_doShow, path_params id) or the inbox (InboxController_doShow, path_params Id). Use when you need to check what a document says. Text found by text recognition (OCR) in a scanned file is marked as such, and a scan without readable text is refused. A camt.053 bank statement (the ISO 20022 bank statement format) comes back as rows: date, amount, direction, counterparty, reference. Other documents are refused. Read-only. Fortnox API (https://api.fortnox.se/apidocs).

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": {
      "company_key": "<company_key>",
      "operation_id": "<operation_id>"
    },
    "name": "read_fortnox_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
company_keyYes
path_paramsNo
operation_idYes
query_paramsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / query_params / additionalProperties / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 500,
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 4000,
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "maxLength": 200,
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        }
      +      ]
      +    },
      +    "maxItems": 200,
      +    "type": "array"
      +  }
      +]
  2. Changed2 schema fields changed
    • removedInput schema / properties / path_params / additionalProperties / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / path_params / additionalProperties / type
      Added value: +[
      +  "string",
      +  "number"
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / query_params
      Added value: +{
      +  "additionalProperties": {
      +    "anyOf": [
      +      {
      +        "maxLength": 500,
      +        "type": "string"
      +      },
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "boolean"
      +      }
      +    ]
      +  },
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the read-only/idempotent annotations: it discloses that OCR-derived text is flagged as such, that unreadable scans are refused rather than returned empty, which document types are rejected, and that camt.053 statements come back as structured rows (date, amount, direction, counterparty, reference). That is exactly the kind of outcome-shape information an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, but the first sentence is a ~90-word run-on that packs every operation variant, parameter mapping and parenthetical glossary into one clause chain. The information is valuable but would read far better as a short table or bulleted list of operation_id → params.

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 a tool with no output schema and generic path_params/query_params containers, the description supplies nearly everything: supported operations, required params per operation, refusal cases, and the return format for camt.053. Only company_key semantics and the general return shape for text/PDF documents remain unspecified.

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 description coverage is 0%, so the description carries the full burden, and it does so by mapping operation_id values to their path_params (DocumentNumber, Type 1–4, id, Id) and query_params (financialYear). The one gap is company_key, whose meaning and format are never explained anywhere.

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?

Opens with a specific verb and resource: returns the text content of a Fortnox document. It then enumerates exactly which document classes are covered (invoice/offer/order PDFs, SIE files, archive/inbox files, camt.053 statements) and names the underlying API operations, which separates it from get_fortnox_document (metadata) and extract_document_fields (structured extraction).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use when you need to check what a document says" gives a clear trigger, and the exclusion rules are explicit: scans without readable text are refused, and document types outside the list are refused. It does not name sibling alternatives such as extract_document_fields for when the agent needs fields rather than raw text, so the routing guidance is clear but not complete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources