Skip to main content
Glama
nyc-checkbook-mcp

nyc-checkbook-mcp

search_contracts

Read-only

Search NYC registered and pending contracts by agency, vendor code, contract ID, date, amount, industry, or MWBE category. Filter structured records; use vendor code for vendor lookup.

Instructions

Search NYC registered and pending contracts with structured filters. Filter by agency, vendor_code, contract ID, date range, amount range, industry, MWBE category, and more. No vendor-name filter (vendor_code only). To find contracts by vendor name: search_spending payee_name, then its contract_id. KNOWN API LIMITATION: registered revenue contracts (category 'revenue') with fiscal_year return no rows from Checkbook NYC (a match count, no records), so the tool refuses that combination without sending a request; omit fiscal_year and filter by dates instead.

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

Input Schema

NameRequiredDescriptionDefault
pinNoContract PIN / tracking number. Live-verified 2026-07-28. An exact PIN returned exactly 1 record.
pageNoPage number, 1-based (default: 1)
statusNoContract status (default: registered)registered
purposeNoContract purpose keyword (server-side 'contains' match). Live-verified 2026-07-28. purpose='software' returned 168 of 19,139 registered/expense FY2025.
categoryNoContract category (default: expense). Fields: registered expense/all use prime_contract_*; registered revenue and pending use plain names (contract_id, purpose).expense
industryNoIndustry code
page_sizeNoResults per page (default: 50, max: 20000)
amount_maxNoMaximum current contract amount
amount_minNoMinimum current contract amount
agency_codeNo3-digit agency code, e.g. '056' for NYPD, '040' for Education
contract_idNoContract number, e.g. 'CT185820201424467'
end_date_toNoContract end date range end (YYYY-MM-DD)
fiscal_yearNoFiscal year, e.g. '2024'
vendor_codeNoVendor identification code (the only vendor filter for contracts)
vendor_nameNoNOT SUPPORTED: no vendor-name filter. Use vendor_code. To find contracts by vendor name: search_spending payee_name, then its contract_id.
award_methodNoAward method code
contract_typeNoContract type code
end_date_fromNoContract end date range begin (YYYY-MM-DD)
mwbe_categoryNoM/WBE category code
start_date_toNoContract start date range end (YYYY-MM-DD)
start_date_fromNoContract start date range begin (YYYY-MM-DD)
received_date_toNoReceived date range end (YYYY-MM-DD). Pending contracts only. Live-verified 2026-07-28.
received_date_fromNoReceived date range begin (YYYY-MM-DD). Pending contracts only (registered use registration_date). Live-verified 2026-07-28. An open-ended range returned the full pending set.
include_sub_vendorsNoInclude sub-vendor / subcontractor detail columns (sub_vendor, sub_vendor_mwbe_category, sub_contract_current_amount, etc.) in the response. Applies to registered expense/all contracts only; ignored for status='pending' and for category='revenue', whose domains list no sub-vendor columns.
registration_date_toNoRegistration date range end (YYYY-MM-DD). Registered contracts only. Live-verified 2026-07-28. A 6-month range returned 9,599 of 19,139.
registration_date_fromNoRegistration date range begin (YYYY-MM-DD). Registered contracts only. Live-verified 2026-07-28.
contract_includes_sub_vendorsNoSub-vendor flag: 1 = contracts that include sub-vendors. Registered contracts only. Live-verified 2026-07-28. 1 returned 3,246 of 19,139 registered/expense FY2025; 0 returned 0. This is an INTEGER, not a status code — the API rejects a non-numeric value with "is not of data type integer", and it does so as HTTP 200 with a plain-text (non-XML) body, which parses as an empty response. Note the response column of the same name reports 'N/A', so an observed column value cannot be fed back in as a filter value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.8.0
    • changedInput schema / properties / agency_code / description
      Previous value: -"3-digit agency code, e.g. '858' for OTI/DoITT, '002' for DoF"New value: +"3-digit agency code, e.g. '056' for NYPD, '040' for Education"
    • changedInput schema / properties / category / description
      Previous value: -"Contract category (default: expense). Record field names follow the API's own domain and differ by shape: registered expense/all use prime_contract_* names (prime_contract_id, prime_contract_purpose, ...); registered revenue and every pending search use plain names (contract_id, purpose, agency, ...). Records are returned as the API sends them, not normalized."New value: +"Contract category (default: expense). Fields: registered expense/all use prime_contract_*; registered revenue and pending use plain names (contract_id, purpose)."
    • changedInput schema / properties / vendor_name / description
      Previous value: -"NOT SUPPORTED as a contracts filter — the Checkbook API has no vendor-name parameter and no name→code lookup. Supplying this returns actionable guidance (use vendor_code, or search_spending with payee_name for name search). Prefer vendor_code."New value: +"NOT SUPPORTED: no vendor-name filter. Use vendor_code. To find contracts by vendor name: search_spending payee_name, then its contract_id."
  2. First observedv1.6.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety is covered; the description adds genuine behavioral context beyond that, notably that the tool pre-validates and refuses the revenue/fiscal_year combination without sending a request, and that category changes which field names appear in the API. It does not describe pagination behavior or the shape of the returned records, which for a 27-parameter search tool would be useful.

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?

Four sentences, front-loaded with purpose then filter enumeration, then the two highest-value caveats (vendor-name routing, API limitation). Every sentence carries information; only the API-limitation sentence runs long. Given 27 parameters, the length is proportionate.

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?

There is no output schema, and for a tool this complex the description covers the critical failure modes, field-name divergence by category, and the cross-tool workaround. It leaves out what a result row contains and how paging behaves, which an agent with no output schema would otherwise have to discover by calling.

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: it flags vendor_name as unsupported despite being in the schema, explains that vendor_code is the only vendor filter, and ties fiscal_year suppression to category='revenue'. That extra guidance goes beyond the per-parameter text, though most of the parameter detail still lives in the schema.

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 and resource with scope: 'Search NYC registered and pending contracts with structured filters.' It also distinguishes scope from sibling contract tools by naming the domain (NYC registered/pending) and explicitly routes vendor-name lookups elsewhere, so an agent can pick it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use and when-not-to-use guidance: no vendor-name filter, and a concrete alternative path ('To find contracts by vendor name: search_spending payee_name, then its contract_id'). It also states a hard precondition (revenue + fiscal_year is refused) and the workaround (omit fiscal_year and filter by dates).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.