Skip to main content
Glama

Fetch order records

fetch_order_records
Read-onlyIdempotent

Returns a page of an order's delivered records (50 by default, up to 100) with the licence block on every page, as JSON or, on request, as CSV. Pages stay under about 8,000 tokens, with approx_tokens on each; pass next_cursor to continue. Fetching again under licence costs 0 credits; it needs records:read. Call check_suppression before any send, and get_compliance_receipt for proof of screening. Lawful basis is UK GDPR Article 6(1)(f) legitimate interests; email audiences include corporate subscribers only by default (PECR), so sole traders and ordinary partnerships are left out unless the toggle is changed.

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": {
      "order_id": "<order_id>"
    },
    "name": "fetch_order_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRecords per page, 1 to 100 over MCP so a result stays under about 8,000 tokens. Default 50.
cursorNoAn opaque cursor from next_cursor. Pass it back unchanged.
fieldsNoColumns to return; default the order's field set.
formatNojson (default) or csv.json
order_idYesThe order whose records to fetch. It must be ready.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / $defs / ComplianceObject / examples
      Previous value: -[
      -  {
      -    "article14_notified_at": "2026-06-14",
      -    "article14_status": "notified",
      -    "attribution": "Contains public sector information licensed under the Open Government Licence v3.0",
      -    "corporate_subscriber": true,
      -    "email_marketing_basis": "pecr_corporate_subscriber",
      -    "lawful_basis": "legitimate_interests_art6_1_f",
      -    "lia_ref": "EM-LIA-2026-03",
      -    "notice_version": "2026-02",
      -    "provenance": {
      -      "company": {
      -        "as_of": "2026-09-21",
      -        "source": "companies_house"
      -      },
      -      "contact": {
      -        "compiled_at": "2026-05-02",
      -        "last_verified_at": "2026-08-30",
      -        "method": "telephone",
      -        "source": "emailmovers_research"
      -      },
      -      "email": {
      -        "provider_location": "EU",
      -        "result": "ok",
      -        "verified_at": "2026-09-10"
      -      }
      -    },
      -    "record_age_days": 147,
      -    "subscriber_class": "ltd",
      -    "subscriber_evidence": {
      -      "companies_house_number": "05046417",
      -      "company_type": "ltd"
      -    },
      -    "suppression_status": "none",
      -    "tps_ctps_screened_at": "2026-09-12",
      -    "tps_ctps_status": "clear",
      -    "tps_ctps_valid_until": "2026-10-10"
      -  }
      -]New value: +[
      +  {
      +    "article14_first_notified_at": "2025-01-14",
      +    "article14_notified_at": "2026-06-14",
      +    "article14_status": "notified",
      +    "attribution": "Contains public sector information licensed under the Open Government Licence v3.0",
      +    "corporate_subscriber": true,
      +    "email_marketing_basis": "pecr_corporate_subscriber",
      +    "lawful_basis": "legitimate_interests_art6_1_f",
      +    "lia_ref": "EM-LIA-2026-03",
      +    "notice_version": "2026-02",
      +    "provenance": {
      +      "company": {
      +        "as_of": "2026-09-21",
      +        "source": "companies_house"
      +      },
      +      "contact": {
      +        "compiled_at": "2026-05-02",
      +        "last_verified_at": "2026-08-30",
      +        "method": "telephone",
      +        "source": "emailmovers_research"
      +      },
      +      "email": {
      +        "provider_location": "EU",
      +        "result": "ok",
      +        "verified_at": "2026-09-10"
      +      }
      +    },
      +    "record_age_days": 147,
      +    "subscriber_class": "ltd",
      +    "subscriber_evidence": {
      +      "companies_house_number": "05046417",
      +      "company_type": "ltd"
      +    },
      +    "suppression_status": "none",
      +    "tps_ctps_screened_at": "2026-09-12",
      +    "tps_ctps_status": "clear",
      +    "tps_ctps_valid_until": "2026-10-10"
      +  }
      +]
    • addedOutput schema / $defs / ComplianceObject / properties / article14_first_notified_at
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "The earliest privacy notice on record: the earliest Article 14 notice date we hold for the person, never after article14_notified_at (the latest). Null while pending or when not known."
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description still adds substantial context beyond them: a ~8,000-token page ceiling with approx_tokens, mandatory licence block on every page, cursor continuation, zero-credit re-fetching, the records:read permission, and PECR/UK GDPR lawful-basis constraints on whose records appear.

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-loaded with what is returned, then pagination, then cost/permissions, then compliance routing — a logical order with little filler. The closing lawful-basis/PECR sentence is long and somewhat tangential to invoking the tool, keeping it from a 5.

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?

For a five-parameter paginated read with a full output schema, nothing needed to call it correctly is missing: page size limits, cursor mechanics, formats, permissions, cost, and the pre-send compliance workflow are all covered.

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 earns an extra point by explaining the pagination loop (pass next_cursor to continue) and that the default page size and token ceiling are linked, which frames why limit is capped.

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 (returns a page of an order's delivered records) plus scope details: default page size 50, max 100, JSON or CSV, licence block per page. It does not distinguish itself from siblings like preview_records or get_order, so an agent must infer which fetch tool to use from names 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?

It gives useful conditional guidance for downstream steps ('Call check_suppression before any send, and get_compliance_receipt for proof of screening') and notes the records:read scope and zero-credit refetch, but never says when to pick this over preview_records or get_order for retrieving order data.

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