Skip to main content
Glama
cliwant

mcp-sam-gov

by cliwant

usas_autocomplete_recipient

Autocomplete recipient names using USAspending-canonical legal names to prevent hallucinations in searches. Returns up to 10 fuzzy matches with UEI/DUNS.

Instructions

Autocomplete recipient names. ANTI-HALLUCINATION — confirm a recipient's exact USAspending-canonical legal name before searching by name. Returns up to 10 fuzzy matches with UEI/DUNS where available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchTextYes
limitNo

Implementation Reference

  • The core handler function `autocompleteRecipient` that calls the USAspending API endpoint `autocomplete/recipient/` and returns fuzzy-matched recipient names with UEI/DUNS.
    export async function autocompleteRecipient(args: {
      searchText: string;
      limit?: number;
    }) {
      type Resp = {
        results?: {
          recipient_name?: string;
          uei?: string;
          duns?: string;
        }[];
      };
      const json = await postUsas<Resp>("autocomplete/recipient/", {
        search_text: args.searchText,
        limit: args.limit ?? 10,
      });
      return {
        recipients: (json.results ?? []).map((r) => ({
          name: r.recipient_name ?? "",
          uei: r.uei,
          duns: r.duns,
        })),
      };
    }
  • The Zod schema `UsasAutocompleteInput` defining input parameters: searchText (string) and optional limit (1-20).
    const UsasAutocompleteInput = z.object({
      searchText: z.string(),
      limit: z.number().min(1).max(20).optional(),
    });
  • src/server.ts:447-452 (registration)
    Registration of the tool in the tools list with name 'usas_autocomplete_recipient', description, and inputSchema reference.
    {
      name: "usas_autocomplete_recipient",
      description:
        "Autocomplete recipient names. ANTI-HALLUCINATION — confirm a recipient's exact USAspending-canonical legal name before searching by name. Returns up to 10 fuzzy matches with UEI/DUNS where available.",
      inputSchema: UsasAutocompleteInput,
    },
  • src/server.ts:757-760 (registration)
    The switch-case handler that routes the tool call to `usas.autocompleteRecipient(UsasAutocompleteInput.parse(args))`.
    case "usas_autocomplete_recipient":
      return await usas.autocompleteRecipient(
        UsasAutocompleteInput.parse(args),
      );
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses fuzzy matching, limit of 10 results, and inclusion of UEI/DUNS. Implicitly safe (autocomplete), but does not explicitly state read-only or no side effects.

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?

Three sentences, no wasted words. First sentence states core purpose, second is crucial warning, third adds useful detail. Well front-loaded.

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?

Given no annotations and no output schema, description covers autocomplete functionality, anti-hallucination use, and result contents. Could mention edge cases or no-match behavior, but sufficient for typical use.

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 2 params with 0% description coverage. Description does not explain 'searchText' or 'limit' explicitly, though 'up to 10' hints at limit. Fails to add meaning beyond the schema.

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 'Autocomplete recipient names' with specific verb and resource. Includes anti-hallucination context and mentions UEI/DUNS, distinguishing it from sibling tools like usas_search_recipients.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly tells when to use: 'confirm a recipient's exact USAspending-canonical legal name before searching by name'. Lacks explicit when-not or alternatives but provides clear context.

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