Skip to main content
Glama

NL Ledger

Search spending records

search_records
Read-onlyIdempotent

Search every line item: contract awards, federal contracts and grants, minister and MHA expense lines, and pay over $100,000. records holds exact matches: every word matches (by prefix), largest amount first, up to 25 per page (use page for more). A misspelled word is corrected when nothing matches exactly (see corrected). On page 1, related_by_meaning adds up to 20 records about the same thing that do not contain every word, closest first. Give a query, a filter, or both. Each record has its source citation. Sources: ppa = Provincial contract award; fed_contract = Federal contract; fed_grant = Federal grant or contribution; canadabuys = Federal award notice; pa_pss = Federal professional services payment; pa_tp = Federal transfer payment; sunshine = Public sector pay over $100,000; minister = Minister's expense claim; mha = MHA expense.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number. Default 1.
yearNoCalendar year of the record date, e.g. 2024.
queryNoWords to find, e.g. 'ferry repair', a company name, a town or a job title.
sourceNoLimit to one source.
patternNoFlag id from list_flags, e.g. no-competition.
supplier_idNoSupplier id from get_supplier.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description layers on genuinely useful behavioral detail beyond them: prefix-based exact matching, largest-amount-first ranking, 25 records per page, automatic spelling correction when nothing matches, and related_by_meaning records only on page 1. It also states that each record carries a source citation, which no structured field discloses.

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?

Dense but front-loaded: matching, ranking, pagination and correction behavior come first, with the source glossary trailing at the end. Every clause carries information, though the source-code list reads like schema glossary material and makes the block heavier than ideal.

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?

With no output schema, the description does the work of explaining returns: exact-match semantics, ordering, page size, the 'corrected' and 'related_by_meaning' fields, and per-record citations. This is close to complete for a 6-param search tool; only the relationship to sibling search tools remains unaddressed.

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, but the description adds real meaning on top: it spells out what each source code (ppa, fed_contract, sunshine, mha, etc.) actually represents, which the schema's enum does not, and restates the 25-per-page / page-1 framing for 'page'. The query/pattern/supplier_id semantics are left to the schema, hence not a 5.

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?

The description gives a specific verb ('Search') and enumerates the exact corpus searched: contract awards, federal contracts and grants, minister/MHA expense lines, and pay over $100,000. That is far more precise than the bare name, though it never distinguishes this tool from the sibling 'search' or 'get_record', so an agent still has to guess which of the search-like siblings to pick.

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?

'Give a query, a filter, or both' plus 'use page for more' gives usable invocation context, and the spelling-correction and related_by_meaning notes hint at fallback behavior. However, there is no explicit when-to-use-this-vs-sibling guidance (e.g. versus 'search' or 'fetch') and no exclusion conditions, so usage is only implied.

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