Skip to main content
Glama
2b3pro

propublica-npo-mcp

by 2b3pro

list_organization_filings

Retrieve all IRS Form 990 filings for a nonprofit, sorted newest first. Default returns curated summaries; pass verbose=true for raw filing arrays.

Instructions

List all IRS Form 990 filings on file for a nonprofit, newest first. By default returns curated summaries; pass verbose=true for the raw filing arrays.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
einYesThe nonprofit EIN, with or without punctuation.
verboseNoReturn the raw filings_with_data and filings_without_data arrays when true.

Implementation Reference

  • The main handler function for list_organization_filings. Calls client.getOrganization(args.ein), then either returns raw filing arrays (verbose mode) or sorted, curated summaries via summarizeFiling().
    export async function handler(
      client: ProPublicaClient,
      args: z.infer<z.ZodObject<typeof inputSchema>>,
    ) {
      try {
        const result = await client.getOrganization(args.ein);
    
        if (args.verbose) {
          return jsonResult({
            filings_with_data: result.filings_with_data,
            filings_without_data: result.filings_without_data,
          });
        }
    
        const filings = [...result.filings_with_data, ...result.filings_without_data]
          .sort((a, b) => filingTaxPeriod(b) - filingTaxPeriod(a))
          .map((filing) => summarizeFiling(filing));
    
        return jsonResult(filings);
      } catch (error) {
        return errorResult(error);
      }
    }
  • Input schema for list_organization_filings: requires 'ein' (string, min 1) and optional 'verbose' (boolean).
    export const inputSchema = {
      ein: z
        .string()
        .min(1)
        .describe("The nonprofit EIN, with or without punctuation."),
      verbose: z
        .boolean()
        .optional()
        .describe("Return the raw filings_with_data and filings_without_data arrays when true."),
    };
  • src/index.ts:44-51 (registration)
    Registration of list_organization_filings tool in the MCP server using server.registerTool(), with name, description, inputSchema, and handler.
    server.registerTool(
      listOrganizationFilings.name,
      {
        description: listOrganizationFilings.description,
        inputSchema: listOrganizationFilings.inputSchema,
      },
      (args) => listOrganizationFilings.handler(client, args),
    );
  • Helper function filingTaxPeriod that extracts the tax period from a filing object, used for sorting filings newest first.
    function filingTaxPeriod(filing: FilingWithData | FilingWithoutData): number {
      return filing.tax_prd ?? filing.tax_prd_yr ?? 0;
    }
  • The summarizeFiling helper used by the handler to curate filing data into a FilingSummary with revenue, expenses, assets, CEO compensation, employees etc.
    export function summarizeFiling(
      filing: FilingWithData | FilingWithoutData,
    ): FilingSummary {
      const withData = filing as FilingWithData;
      const hasData =
        withData.totrevenue !== undefined ||
        withData.totfuncexpns !== undefined ||
        withData.totassetsend !== undefined ||
        withData.totnetassetend !== undefined ||
        withData.compnsatncurrofcr !== undefined ||
        withData.noemplyeesw3cnt !== undefined;
    
      return {
        tax_period: filingTaxPeriod(filing),
        total_revenue: hasData ? (withData.totrevenue ?? null) : null,
        total_expenses: hasData ? (withData.totfuncexpns ?? null) : null,
        total_assets: hasData ? (withData.totassetsend ?? null) : null,
        net_assets: hasData ? (withData.totnetassetend ?? null) : null,
        ceo_compensation: hasData ? (withData.compnsatncurrofcr ?? null) : null,
        employees: hasData ? (withData.noemplyeesw3cnt ?? null) : null,
        source: filingSource(filing),
        has_data: hasData,
      };
    }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses default behavior and the effect of verbose, but lacks details on limitations, pagination, or error handling.

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 concise with two front-loaded sentences. Every word adds value, no redundancy or filler.

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

Completeness3/5

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

Given no output schema, the description does not fully detail the return format (what curated summaries contain). It adequately covers the core functionality but lacks completeness about return structure and edge cases.

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%, and the description adds minimal new meaning beyond the schema definitions for ein and verbose. Baseline of 3 is appropriate as it does not degrade but does not enhance.

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 tool lists IRS Form 990 filings for a nonprofit, ordered newest first. It distinguishes from siblings like compare_nonprofits and search_nonprofits by specifying the exact resource and action.

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 provides explicit guidance on using the verbose parameter for raw arrays versus default curated summaries. However, it does not explicitly state when not to use this tool or compare to alternatives.

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