Skip to main content
Glama

ABS Data (observed)

Search the catalogue by writing code

search

Run JavaScript against the whole catalogue document — every table, its dimensions, coverage and small-dimension options — in an isolated sandbox with no network. Use it to answer questions the fixed verbs make awkward: 'which tables have both an SA2 geography and a quarterly frequency?', 'list every dimension name and how often it appears', 'find codelists whose labels mention rent'. Your code runs inside an async function with catalogue in scope; return a JSON-serialisable value; console.log output is captured.

// The catalogue object available in search(): interface Catalogue { provenance: { runId: string; observedAt: string }; corpus: { tables: number; seriesConfirmed: number; seriesImpliedByMetadata: number; density: number }; tables: Record<string, { // keyed by table id, e.g. catalogue.tables.CPI id: string; name: string|null; description: string|null; seriesCount: number; frequencies: string[]; coverage: { from: string|null; to: string|null }; density: number|null; family: string|null; geography: string|null; topics: string[]; dimensions: { id: string; position: number; codelist: string|null; optionCount: number; literal: boolean }[]; }>; options: { literal: Record<string, Record<string, string|null>>; // codelist id -> { code: label } for small codelists (<=64 options) branded: Record<string, number>; // large codelists -> option count (use abs.searchOptions in execute) }; }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript. `catalogue` is in scope. Must return a value.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
logsYes
errorNo
resultNo
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes the isolated sandbox, no-network execution, async function context, in-scope `catalogue` object, JSON-serialisable return requirement, and captured console.log output. This gives an agent an accurate model of side effects and execution environment.

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 prose is front-loaded with the core purpose and the code block is well structured. The description is long, but nearly every line is necessary for an arbitrary-code tool; the three examples add clarity though one or two might have sufficed.

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 single-parameter code-execution tool, the description provides everything needed: when to use it, what is in scope, exact data shapes, and output/return behavior. The reference to `abs.searchOptions in execute` is slightly cryptic, but the overall contract is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only says the parameter is JavaScript and must return a value. The description compensates with the complete Catalogue interface, including table shapes, dimension structures, codelist maps, and frequency/coverage fields. This goes far beyond schema coverage and enables an agent to write realistic code.

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?

The description states a specific verb and resource: run JavaScript against the whole catalogue document. It distinguishes itself from the fixed-verb siblings by explaining it exists for questions those tools make awkward, and it provides concrete examples. The title and description align cleanly.

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?

It explicitly says to use this tool when the fixed verbs make a question awkward and gives three representative query shapes. It does not name the sibling tools directly or say exactly which one each example would replace, but the intended usage context is unambiguous.

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.