Skip to main content
Glama

Get US federal spending by state, county or country

economy_government_spend_get
Read-onlyIdempotent

Get US federal spending summed by state, county or country for a date window, filtered by award type, industry (NAICS), product or service (PSC) and keyword. Optional inputs: level, scope, state, awardType, naics and 4 more. Costs credits; see meta.creditsCharged.

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": {
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "economy_government_spend_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd of the window, `YYYY-MM-DD`. With only `to`: the year up to that day.
pscNoFederal product and service codes (PSC), comma-separated, up to 20. 1 to 4 characters; a shorter code covers its family, e.g. `D3` (IT services) or `R425`.
fromNoStart of the window, `YYYY-MM-DD`, not before `2007-10-01`. Without `from` and `to`: the latest US federal fiscal year (1 October to 30 September) that ended at least 90 days ago. With only `from`: to today.
levelNoWhat to sum by: `state` (default), `county` or `country` (spending abroad included).
naicsNoNAICS industry codes, comma-separated, up to 20. Each has 2, 4 or 6 digits; a shorter code covers its whole family, e.g. `4811` (scheduled air transport) or `54`.
scopeNo`place_of_performance` (default, where the work is done) or `recipient_location` (where the recipient is based).
stateNoOnly this state, as a two-letter USPS code, e.g. `CA`. With `level=county`, its counties.
contextYesDescribe the user's underlying goal in one sentence, not the tool you are calling.
keywordNoText matched against award descriptions, e.g. `cybersecurity`. 3 to 120 characters.
awardTypeNo`contracts` (default), `grants`, `loans`, `direct_payments`, `other` or `all`.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (for example "claude-opus-4-8" or "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" and do not guess.
conversation_idNoEcho the conversation_id from the server's previous response. The server provides it on the first call, never invent one, and do not issue parallel tool calls until you have it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive open-world operation. The description adds useful behavioral context by disclosing that the call costs credits and points to `meta.creditsCharged` for the amount.

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 definition is front-loaded and compact, with the core purpose in the first sentence and cost information immediately after. The phrase 'and 4 more' is slightly vague, but overall the wording earns its place.

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 12-parameter data retrieval tool with full schema descriptions and annotations, the description gives enough context to invoke it correctly: purpose, grouping options, date window, filters, and cost. It does not describe the return shape, which is a minor gap because no output schema exists.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameter schema already explains each input in detail. The description summarizes the filter categories and names some optional inputs, but adds little meaning beyond the schema and does not clarify the unnamed remaining parameters.

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: getting US federal spending summed by state, county or country. The aggregation wording distinguishes it from sibling search tools, and the filter categories make the scope concrete.

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?

Usage is implied by the aggregation and geography wording, but the description does not explicitly state when to use this tool rather than alternatives such as the government contracts search or consumer/tourism spending tools. No exclusions or prerequisites are given.

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.