Skip to main content
Glama

Get Data Range

get_data_range
Read-onlyIdempotent

Return the period coverage (data_min/data_max, 'YYYY-MM') actually cached for the given customs code(s) -- use before picking period_start/period_end so you don't request an empty window.

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": "get_data_range"
  }
}

Input Schema

NameRequiredDescriptionDefault
customs_codesNoCustoms code(s) to check coverage for. Omit for the overall store range.

Output Schema

NameRequiredDescriptionDefault
resultYesGET /api/reference/data-range — cached period coverage ('YYYY-MM').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / result / required
      Added value: +[
      +  "data_min",
      +  "data_max",
      +  "selection"
      +]
  2. Changed5 schema fields changed
    • addedInput schema / properties / customs_codes
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
      +        "type": "string"
      +      },
      +      "maxItems": 50,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Customs code(s) to check coverage for. Omit for the overall store range."
      +}
    • removedInput schema / properties / products
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "CN code(s) to check coverage for. Omit for the overall store range."
      -}
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +false
    • addedOutput schema / properties
      Added value: +{
      +  "result": {
      +    "additionalProperties": false,
      +    "description": "GET /api/reference/data-range — cached period coverage ('YYYY-MM').",
      +    "properties": {
      +      "data_max": {
      +        "anyOf": [
      +          {
      +            "description": "A calendar month, 'YYYY-MM'.",
      +            "pattern": "\\d{4}-\\d{2}",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The last month with data in the local store, over the codes' raw declarations."
      +      },
      +      "data_min": {
      +        "anyOf": [
      +          {
      +            "description": "A calendar month, 'YYYY-MM'.",
      +            "pattern": "\\d{4}-\\d{2}",
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The first month with data in the local store, over the codes' raw declarations (every definition)."
      +      },
      +      "selection": {
      +        "description": "For each piece given (the basket request form), the coverage of its window -- separate from the raw base coverage above.",
      +        "items": {
      +          "additionalProperties": false,
      +          "description": "The stored coverage of one piece: the months holding data inside its\nwindow, so gaps between definitions stay visible.",
      +          "properties": {
      +            "customs_code": {
      +              "description": "The piece's customs code.",
      +              "type": "string"
      +            },
      +            "from_month": {
      +              "anyOf": [
      +                {
      +                  "description": "A calendar month, 'YYYY-MM'.",
      +                  "pattern": "\\d{4}-\\d{2}",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "The window's first month, ISO 'YYYY-MM'; null = the store coverage start."
      +            },
      +            "to_month": {
      +              "anyOf": [
      +                {
      +                  "description": "A calendar month, 'YYYY-MM'.",
      +                  "pattern": "\\d{4}-\\d{2}",
      +                  "type": "string"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "The window's last month, ISO 'YYYY-MM'; null = the store coverage end."
      +            },
      +            "windows": {
      +              "description": "The months holding data inside the piece's window; an empty list means nothing is stored there.",
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "data_max": {
      +                    "description": "The last month with data inside the window ('YYYY-MM').",
      +                    "pattern": "\\d{4}-\\d{2}",
      +                    "type": "string"
      +                  },
      +                  "data_min": {
      +                    "description": "The first month with data inside the window ('YYYY-MM').",
      +                    "pattern": "\\d{4}-\\d{2}",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "data_min",
      +                  "data_max"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "required": [
      +            "customs_code",
      +            "from_month",
      +            "to_month",
      +            "windows"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "result"
      +]
  3. Changed4 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / products / title
      Removed value: -"Products"
    • removedInput schema / title
      Removed value: -"get_data_rangeArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context beyond that: the returned values reflect what is 'actually cached' (i.e., coverage may be partial rather than the full dataset), and it is intended as a cheap guard before a data request.

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

Conciseness5/5

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

One sentence, front-loaded with the returned fields, followed by the actionable reason to call it. No filler and nothing repeated from the schema or annotations.

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 one-parameter, read-only lookup with an output schema and full annotation coverage, nothing material is missing: the agent knows what it returns, in what format, and how to sequence the call relative to period-based requests.

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% and there is a single optional parameter, so the schema already explains customs_codes, the TOTAL/residual-spelling allowance, and the omit-for-overall-range default. The description only echoes 'given customs code(s)' without adding format or edge-case meaning, so baseline 3 applies.

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?

States a specific verb ('Return') and a precisely scoped resource ('the period coverage ... actually cached'), including the exact output field names data_min/data_max and their 'YYYY-MM' format. This is metadata-about-coverage, a distinct operation from the data-retrieval siblings, so an agent can identify it without ambiguity.

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 pre-condition workflow: 'use before picking period_start/period_end so you don't request an empty window.' That tells the agent when to reach for it and why. It stops short of naming a specific alternative tool or stating when not to bother, so it is not a full 5.

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