Skip to main content
Glama

Usa Spending By Category

usa_spending_by_category
Read-onlyIdempotent

Analyze federal spending by industry, product/service, recipient, or agency. Returns spending totals per category. Use for market research and identifying government contracting opportunities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results (1-100, default 10)
agencyNoOptional awarding agency name filter
categoryYesCategory to group by: naics, psc, recipient, awarding_agency, awarding_subagency
end_dateYesEnd date in YYYY-MM-DD format
keywordsNoOptional keywords to filter spending
start_dateYesStart date in YYYY-MM-DD format

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYesSpending breakdown by category
categoryYesCategory grouping used (naics, psc, recipient, awarding_agency, awarding_subagency)
total_countYesTotal number of categories in results

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / total_count / type
      Previous value: -"number"New value: +[
      +  "number",
      +  "null"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "category": {
      +      "description": "Category grouping used (naics, psc, recipient, awarding_agency, awarding_subagency)",
      +      "type": "string"
      +    },
      +    "results": {
      +      "description": "Spending breakdown by category",
      +      "items": {
      +        "properties": {
      +          "amount": {
      +            "description": "Total spending for this category",
      +            "type": "number"
      +          },
      +          "code": {
      +            "description": "Category code if applicable",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "id": {
      +            "description": "Category identifier if applicable",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "name": {
      +            "description": "Category name",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "amount",
      +          "code",
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total_count": {
      +      "description": "Total number of categories in results",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "category",
      +    "total_count",
      +    "results"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "category": "naics",
      +    "end_date": "2024-12-31",
      +    "start_date": "2024-01-01"
      +  },
      +  {
      +    "agency": "General Services Administration",
      +    "category": "recipient",
      +    "end_date": "2024-12-31",
      +    "keywords": [
      +      "software"
      +    ],
      +    "limit": 50,
      +    "start_date": "2023-01-01"
      +  }
      +]
  4. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already provide readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, so the safety profile is clear. The description adds little behavioral detail beyond restating that it returns spending totals per category, which is already implied by the schema and output schema; there is no contradiction with annotations.

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 is compact: three short sentences that front-load the core action, then describe the return value and intended use. No filler or redundant detail appears.

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 a complete input schema, a rich annotation set, and an output schema present, the description does not need to restate parameter formats or return values. It provides enough context for use cases and grouping options, though it could be slightly more explicit about how it differs from related usa_spending_* sibling tools.

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 schema fully documents all six parameters. The description's phrase 'by industry, product/service, recipient, or agency' offers friendly labels for the category values but adds no technical parameter detail beyond the schema.

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 clearly states the tool's action ('Analyze federal spending') and resource dimensions ('by industry, product/service, recipient, or agency'), which maps to the category enum options. It is more specific than the tool name alone)Skip grade but does not explicitly differentiate from sibling tools like usa_spending_by_agency or usa_spending_trends.

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?

The description gives a clear intended-use context: 'market research and identifying government contracting opportunities.' However, it does not explain when not to use this tool or how it should be selected over sibling spending-analysis tools such as usa_spending_by_agency or usa_spending_trends.

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.