Skip to main content
Glama

More AI - ChatGPT & Claude MCP (Fortnox)

Läs flera underlag i ett anrop

extract_document_fields
Read-onlyIdempotent

Reads several document files in one call: amount, date, supplier, invoice number, OCR number (Swedish payment reference) and bank giro for each file in an inbox folder (mapp) or a list of file ids (ids). Use when the person asks what the invoices or receipts in an inbox folder say. Files not reached within the call's time limit are listed as remaining. Example question: "Vad står det på fakturorna som ligger i inkorgen?" Read-only; computed on the server from live Fortnox data over all pages (Fortnox API, https://api.fortnox.se/apidocs).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "extract_document_fields"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsNovalfritt: filernas id, kommaseparerade (högst 40) — i stället för hela mappen, eller för att fortsätta med remaining Comma-separated.
mappNoinkorgens mapp: inbox_s (leverantörsfakturor, standard), inbox_v (verifikationer), inbox_ku (kvitto och utlägg), inbox_d (dagskassa) One of: inbox_s, inbox_v, inbox_ku, inbox_d.
namnNovalfritt: del av filnamnet (sok och filnamn betyder samma sak); bara de filer i mappen vars namn innehåller texten läses

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds genuinely non-obvious behavior: files not reached within the call's time limit are listed as remaining, and results are computed server-side from live Fortnox data across all pages. Auth scope details are only a link to the API docs.

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-loads what is read and which fields, then the trigger, then the truncation caveat, then the example. The restated 'Read-only' and the raw API doc URL are marginally redundant given the annotations, but no sentence is seriously wasted.

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?

Output schema exists so return shape need not be described, and the description still covers the one behavioral surprise an agent must know: partial results with a `remaining` list to continue from. For a three-parameter, all-optional extraction tool, nothing call-critical 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 both `mapp` and `ids` are already documented with enum values. The description adds only the interplay between `ids` and the `remaining` result, and does not mention the `namn` filename filter at all; with full schema coverage, 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 ('Reads several document files in one call') and enumerates exactly which fields are pulled from each file, so the agent knows this is a multi-file field extractor rather than a raw reader. The 'several files in one call' scoping implicitly differentiates it from single-document siblings, though no sibling is named explicitly.

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?

Gives an explicit trigger ('Use when the person asks what the invoices or receipts in an inbox folder say') plus a worked Swedish example question, and explains that `ids` is used to continue with the files listed as `remaining`. It stops short of stating when NOT to use it (e.g. when a single specific file should be read rather than extracted).

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