Skip to main content
Glama

usaspending-mcp-server

Get Federal Account

usaspending_get_federal_account
Read-onlyIdempotent

Fetch a federal account's budget data: total obligations, gross outlays, and budgetary resources, plus the per-Treasury-Account-Symbol (TAS) component breakdown in children. fiscal_year selects a reporting year; omit it for the current federal fiscal year. An empty year retains metadata and a notice, without substituting another year. Federal accounts connect appropriations law to actual agency spending. Account codes come from usaspending_search_federal_accounts (its account_number output field) or usaspending_get_award_federal_accounts (its federal_account field), and are formatted as AGENCY-MAIN (e.g., 097-0100 for DoD Operation and Maintenance). For obligations broken down by program activity or object class, use usaspending_get_federal_account_breakdown.

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": {
      "account_code": "<account_code>"
    },
    "name": "usaspending_get_federal_account"
  }
}

Input Schema

NameRequiredDescriptionDefault
fiscal_yearNoFederal fiscal year (2001 through the current federal fiscal year; October 1 rollover). Omit or leave blank to preserve the endpoint default.
account_codeYesFederal account code in AGENCY-MAIN format (e.g., 097-0100). Returned as account_number by usaspending_search_federal_accounts and as federal_account by usaspending_get_award_federal_accounts.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoExplains when the selected fiscal year has no financial totals or Treasury Account Symbol components; no alternative year is substituted
childrenNoTreasury Account Symbol (TAS) components that make up this federal account, each with its own obligated, outlay, and budgetary-resource amounts. Omitted when the upstream returns none.
bureau_nameNoBureau name within the agency
fiscal_yearNoFiscal year of the financial data
account_titleNoFull account title
agency_identifierNoAgency identifier code
main_account_codeNoMain account code
parent_agency_nameNoManaging parent agency name
federal_account_codeNoFederal account code
total_obligated_amountNoTotal obligated amount in USD
total_budgetary_resourcesNoTotal budgetary resources in USD
total_gross_outlay_amountNoTotal gross outlay amount in USD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / fiscal_year
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Integer federal fiscal year from 2001 through the current federal fiscal year",
      +      "maximum": 9007199254740991,
      +      "minimum": 2001,
      +      "type": "integer"
      +    },
      +    {
      +      "description": "Blank form value; leaves the fiscal year unset",
      +      "maxLength": 0,
      +      "minLength": 0,
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Federal fiscal year (2001 through the current federal fiscal year; October 1 rollover). Omit or leave blank to preserve the endpoint default."
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Explains when the selected fiscal year has no financial totals or Treasury Account Symbol components; no alternative year is substituted",
      +  "type": "string"
      +}
  2. Changed5 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `account_not_found`: No federal account found for the given account code. `api_unavailable`: USAspending.gov API is unreachable or returns an error. `api_timeout`: USAspending.gov did not respond before the request deadline elapsed. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "account_not_found",
      +            "api_unavailable",
      +            "api_timeout"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / account_code / description
      Previous value: -"Federal account code in AGENCY-MAIN format (e.g., 097-0100). Returned as account_number by usaspending_search_federal_accounts."New value: +"Federal account code in AGENCY-MAIN format (e.g., 097-0100). Returned as account_number by usaspending_search_federal_accounts and as federal_account by usaspending_get_award_federal_accounts."
    • addedOutput schema / properties / children
      Added value: +{
      +  "description": "Treasury Account Symbol (TAS) components that make up this federal account, each with its own obligated, outlay, and budgetary-resource amounts. Omitted when the upstream returns none.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Treasury Account Symbol component with its own financial amounts",
      +    "properties": {
      +      "budgetary_resources_amount": {
      +        "description": "Budgetary resources in USD for this Treasury Account Symbol",
      +        "type": "number"
      +      },
      +      "code": {
      +        "description": "Full Treasury Account Symbol (e.g., 080-2020/2021-0120-000) — the availability-period-scoped component of this federal account, not an account_code accepted by this tool",
      +        "type": "string"
      +      },
      +      "gross_outlay_amount": {
      +        "description": "Gross outlay amount in USD for this Treasury Account Symbol",
      +        "type": "number"
      +      },
      +      "name": {
      +        "description": "Treasury Account Symbol title",
      +        "type": "string"
      +      },
      +      "obligated_amount": {
      +        "description": "Obligated amount in USD for this Treasury Account Symbol",
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / account_code / description
      Previous value: -"Federal account code in AGENCY-MAIN format (e.g., 097-0100). Appears in award funding details from usaspending_get_award."New value: +"Federal account code in AGENCY-MAIN format (e.g., 097-0100). Returned as account_number by usaspending_search_federal_accounts."
  5. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, closed-world behavior, and the description adds a non-obvious edge case beyond them: an empty year 'retains metadata and a notice, without substituting another year' — so the agent won't mistake a sparse response for a failure. It does not mention error modes or pagination limits for the children list, keeping it short of a 5.

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?

Front-loaded with the return payload, then defaults, then code provenance, then the alternative — a sensible ordering with no wasted lead-in. It is on the dense side at six sentences, and the background line about appropriations law is context rather than instruction, but nothing is misleading or padded enough to hurt.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema and full annotation coverage in place, the description only needs to supply routing, defaults, and edge cases — and it does all three, including how to obtain the required account_code from two sibling tools. An agent could call this correctly on the first attempt from the description alone.

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% and the schema already spells out the AGENCY-MAIN format and the 097-0100 example, so much of the description's parameter text is restatement. It does add real meaning by resolving the schema's vague 'preserve the endpoint default' into 'omit it for the current federal fiscal year', and by naming the exact upstream output fields that supply the code.

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?

Opens with a specific verb+resource ('Fetch a federal account's budget data') and enumerates what comes back: total obligations, gross outlays, budgetary resources, plus the per-TAS children breakdown. That scope statement separates it cleanly from the sibling breakdown and search tools without needing their schemas.

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 signals (omit fiscal_year for the current FY), names the two sources for the required account_code, and routes the agent elsewhere for the specific alternative case: 'For obligations broken down by program activity or object class, use usaspending_get_federal_account_breakdown.' Both the substitute and the condition are stated.

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.