Skip to main content
Glama
2b3pro

propublica-npo-mcp

by 2b3pro

get_organization

Retrieve complete nonprofit details by EIN, including metadata and latest IRS Form 990 summary. Optionally receive the raw ProPublica payload by setting verbose=true.

Instructions

Get full details for a single nonprofit by EIN, including organization metadata and a summary of the most recent IRS Form 990 filings. Pass verbose=true for the raw upstream payload.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
einYesThe nonprofit EIN, with or without punctuation.
verboseNoReturn the full raw ProPublica payload when true.

Implementation Reference

  • The main handler function that executes the 'get_organization' tool logic. Calls client.getOrganization() and returns either verbose raw data or a summarized result.
    export async function handler(
      client: ProPublicaClient,
      args: z.infer<z.ZodObject<typeof inputSchema>>,
    ) {
      try {
        const result = await client.getOrganization(args.ein);
        return jsonResult(args.verbose ? result : summarizeOrganization(result));
      } catch (error) {
        return errorResult(error);
      }
    }
  • Input schema defining the 'ein' (required string) and 'verbose' (optional boolean) parameters for the tool.
    export const inputSchema = {
      ein: z
        .string()
        .min(1)
        .describe("The nonprofit EIN, with or without punctuation."),
      verbose: z
        .boolean()
        .optional()
        .describe("Return the full raw ProPublica payload when true."),
    };
  • src/index.ts:35-42 (registration)
    Registration of the 'get_organization' tool with the MCP server, binding name, description, inputSchema, and handler.
    server.registerTool(
      getOrganization.name,
      {
        description: getOrganization.description,
        inputSchema: getOrganization.inputSchema,
      },
      (args) => getOrganization.handler(client, args),
    );
  • Helper method on ProPublicaClient that normalizes the EIN and fetches organization data via the ProPublica API with caching.
    async getOrganization(ein: string): Promise<OrganizationResponse> {
      const normalizedEin = normalizeEin(ein);
      const cacheKey = `org:${normalizedEin}`;
    
      return this.getOrSet<OrganizationResponse>(cacheKey, async () =>
        this.fetchJson<OrganizationResponse>(`organizations/${normalizedEin}.json`, {
          normalizedEin,
          logContext: `getOrganization ${normalizedEin}`,
        }),
      );
    }
Behavior4/5

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

With no annotations, the description carries the burden. It discloses the verbose mode for raw payload and mentions the summary of most recent filings. It does not state if the operation is read-only, but for a detail retrieval it's implicitly safe.

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 with no wasted words. The purpose is stated first, followed by an optional parameter guidance.

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 simple tool with 2 parameters and no output schema, the description is adequate. It explains what is returned (metadata + Form 990 summary) and the verbose option. It could mention error handling or scope of summary but is sufficient.

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 coverage is 100% with clear descriptions for both parameters. The description adds no new meaning beyond the schema, so baseline 3 is appropriate.

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 clearly states the verb 'Get full details' and resource 'single nonprofit by EIN', and specifies what is included (organization metadata and summary of recent Form 990 filings). It distinguishes from sibling tools like 'search_nonprofits' which is for searching, not retrieving by EIN.

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?

The description implies usage when you have a specific EIN and need full details, but does not explicitly state when not to use or mention alternatives. However, the context given ('by EIN') makes usage clear.

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/2b3pro/propublica-npo-mcp'

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