Skip to main content
Glama

ABS Data (observed)

Search the catalogue by writing code

search
Read-onlyIdempotent

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) }; }

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": {
      "code": "<code>"
    },
    "name": "search"
  }
}

Input Schema

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

Output Schema

NameRequiredDescriptionDefault
okYes
logsYes
errorNo
resultNo
truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, destructive=false and openWorld=false, so safety is covered. The description earns credit for disclosing the sandbox's no-network constraint, the async wrapper, the return-value requirement and console.log capture. Remaining gaps — execution timeouts, memory limits, and whether errors surface as thrown exceptions — are left unstated for a tool that executes arbitrary user code.

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?

Purpose, when-to-use, and execution contract are front-loaded in three tight sentences before the interface block. The type definition is long but every field carries invocation-relevant meaning, and the comment on `branded` codelists earns its space. Minor deduction for the interface being dense enough to require careful parsing mid-description.

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?

Output schema and annotations are rich, so the description needn't explain return values, and it correctly focuses on the input contract. The catalogue interface supplies exactly the structural knowledge needed to write working code. What's missing is runtime envelope information — sandbox limits, failure modes, and whether large result sets are truncated.

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?

With one parameter at 100% schema coverage, the baseline is a 3, but the description goes well beyond the schema's 'catalogue is in scope' note. The embedded Catalogue interface documents provenance, corpus, table shape, and — critically — the split between literal codelists (<=64 options) and branded ones that require searchOptions/execute, which directly shapes how correct code must be written.

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 concrete verb and mechanism — run JavaScript against the whole catalogue document in an isolated sandbox — and scopes it to data the fixed verbs can't reach. Three example questions make the capability unmistakable, though it never names the siblings (search_tables, execute, search_options) it implicitly contrasts with.

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?

Explicitly frames usage as 'questions the fixed verbs make awkward' and supplies three representative queries, which is clear when-to-use guidance. It stops short of stating when NOT to reach for this tool (e.g. prefer search_tables for plain lookups) or what happens when code fails.

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.