Skip to main content
Glama
blencorp

Capture MCP Server

by blencorp

aggregate_contracts

Group USASpending federal contract awards by agency, recipient, NAICS, PSC, month, or set-aside to get obligation totals or award counts. Answers spending questions without pulling individual rows.

Instructions

Aggregate federal contract awards from USASpending without pulling rows: group by awarding_agency, awarding_subagency, recipient, naics, psc, month, or set_aside, with metric 'obligations' (dollars) or 'count' (prime awards). This is the tool for questions like 'how many 8(a) sole source awards per agency in Aug-Sep 2025'. Counts state their unit and the date filter states its date_type. group_by=set_aside issues one upstream query per code (~4s each due to rate pacing); metric 'count' is supported for group_by set_aside only (USASpending exposes counts per filter, not per category).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pscNoPSC codes
limitNoMax groups to return for category group_bys (default 25, max 100)
naicsNoNAICS codes
agencyNoAwarding toptier agency NAME as USASpending knows it (e.g. 'Department of Veterans Affairs')
metricNo'obligations' (default; aggregated dollars) or 'count' (prime award count; only with group_by=set_aside)
date_toYesEnd date YYYY-MM-DD (required)
group_byYesOne of: awarding_agency, awarding_subagency, recipient, naics, psc, month, set_aside
date_fromYesStart date YYYY-MM-DD (required)
date_typeNoWhich award date the window filters on: 'action_date' (default), 'date_signed', or 'new_awards_only'. Different choices produce materially different totals — the response echoes this as date_field.
set_asideNoFPDS set-aside code(s), validated (e.g. ['8AN','SDVOSBS']). Required when group_by=set_aside.
sub_agencyNoAwarding subtier agency name (requires agency)
award_type_codesNoAward type codes (default ['A','B','C','D'] = contract prime awards; see lookup_reference_code domain award_type)
recipient_searchNoRecipient name or UEI text filter
Behavior5/5

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

No annotations were provided, so the description carries the full behavioral-disclosure burden. It exceeds that burden by disclosing upstream rate/performance implications ('one upstream query per code, ~4s each'), the date_type echo behavior, and the restrictions on metric 'count'. These are behavior traits an agent cannot infer from the schema alone.

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?

The description front-loads the core behavior, then gives a concrete example, then notes key behavioral caveats. Every sentence earns its place, and there is no filler, fluff, or duplicated schema content.

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?

For a 13-parameter tool with no annotations and no output schema, this description is quite complete: it explains when to use it, what the aggregation semantics are, and what performance/rate implications to expect. It could still be improved by explicitly describing the response/result shape, which the current description only partly implies.

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 description coverage is 100%, so the baseline is 3. The description adds real semantic depth above the schema by explaining why group_by=set_aside has unique cost behavior, why count is only supported there, and that counts state their unit. It doesn't repeat every parameter, but it gives the context that makes parameters more usable.

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 opening sentence names the action ('Aggregate federal contract award...') and the resource (USASpending), and explicitly distinguishes this tool from row-returning tools with 'without pulling rows'. It also enumerates the supported group_by dimensions and metrics, making the tool's scope unambiguous.

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?

The description explicitly says 'This is the tool for questions like...' and gives a concrete query shape, which tells the agent exactly when to select it. It also clearly communicates the boundary for when not to use it: 'without pulling rows', which contrasts with the row-returning siblings, and restricts metric=count to set_aside group_bys.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/blencorp/capture-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server