Skip to main content
Glama
cliwant

mcp-sam-gov

by cliwant

usas_search_federal_account_spending

Search federal account spending broken down by Treasury Account Symbol (TAS). Filter by agency, NAICS, or fiscal year to map money to budget line items like '036-0167 = Information Technology Systems, VA'.

Instructions

Spending broken down by federal account / Treasury Account Symbol (TAS). Use to map money to the actual budget line item (e.g. '036-0167 = Information Technology Systems, VA').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agencyNo
naicsNo
fiscalYearNo
limitNo

Implementation Reference

  • The actual handler function `searchFederalAccountSpending` that calls the USAspending API endpoint 'search/spending_by_category/federal_account' with built filters and returns an array of federal accounts (TAS codes), account names, and amounts.
    export async function searchFederalAccountSpending(args: {
      agency?: string;
      naics?: string;
      fiscalYear?: number;
      limit?: number;
    }) {
      const filters = buildFilters(args);
      type Resp = {
        results?: { code?: string; name?: string; amount?: number }[];
      };
      const json = await postUsas<Resp>(
        "search/spending_by_category/federal_account",
        { filters, limit: args.limit ?? 10, page: 1 },
      );
      return {
        accounts: (json.results ?? []).map((r) => ({
          tasCode: r.code ?? "",
          accountName: r.name ?? "",
          amount: r.amount ?? 0,
        })),
      };
    }
  • The Zod input schema `UsasCategorySpendingInput` used by the federal account spending tool, accepting optional agency, naics, fiscalYear, and limit parameters.
    const UsasCategorySpendingInput = z.object({
      agency: z.string().optional(),
      naics: z.string().optional(),
      fiscalYear: z.number().int().min(2007).optional(),
      limit: z.number().min(1).max(50).optional(),
    });
  • src/server.ts:393-398 (registration)
    The tool registration entry in the TOOLS array defining the tool name 'usas_search_federal_account_spending', its description, and linking to UsasCategorySpendingInput schema.
    {
      name: "usas_search_federal_account_spending",
      description:
        "Spending broken down by federal account / Treasury Account Symbol (TAS). Use to map money to the actual budget line item (e.g. '036-0167 = Information Technology Systems, VA').",
      inputSchema: UsasCategorySpendingInput,
    },
  • src/server.ts:723-726 (registration)
    The switch-case handler in runTool that dispatches 'usas_search_federal_account_spending' to the searchFederalAccountSpending function with parsed args from UsasCategorySpendingInput.
    case "usas_search_federal_account_spending":
      return await usas.searchFederalAccountSpending(
        UsasCategorySpendingInput.parse(args),
      );
Behavior2/5

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

No annotations provided, so the description bears full responsibility for behavioral disclosure. It does not mention data freshness, pagination, rate limits, or whether it is read-only.

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?

Two sentences: first states function, second provides a concrete usage example. No unnecessary words.

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

Completeness2/5

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

Given zero schema descriptions and no output schema, the description is insufficient. It omits parameter definitions and return format, making it hard for an agent to invoke correctly.

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

Parameters2/5

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

Schema has 0% description coverage and the description does not explain the parameters (agency, naics, fiscalYear, limit). It only gives an example of a TAS code format, not how to construct inputs.

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?

Description clearly states the tool breaks down spending by federal account/TAS, with a concrete example. It distinguishes from siblings that use different dimensions like agency or subagency.

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 hint 'Use to map money to the actual budget line item' gives context but does not explicitly state when to prefer this over alternatives like usas_search_agency_spending or usas_search_subagency_spending.

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/cliwant/mcp-sam-gov'

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