Skip to main content
Glama

Search NFIP Flood Insurance Claims

fema_search_nfip
Read-only

Search National Flood Insurance Program (NFIP) claims data by state, county, ZIP code, and year range. Returns the matching claim count and claim records — amounts paid on building and contents, damage estimates, flood zones, cause and occupancy codes, and loss dates — newest loss first. state is required — the full NFIP dataset is 2.7 million rows; unfiltered access is prohibited. Page the inline claims with limit and offset; a page holds at most 100,000 characters of claims. When DataCanvas is enabled (CANVAS_PROVIDER_TYPE=duckdb) and the match exceeds that inline budget, a call at offset 0 stages the match (up to 50,000 claims) on a canvas: inspect the staged table with fema_dataframe_describe, then aggregate it with SQL via fema_dataframe_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum claims to return inline (1–10000, default 1000). A page also stops at 100,000 characters of claims (roughly 330 claims); when either bound leaves matching claims out, the notice names the offset to continue from. When DataCanvas is enabled and the match exceeds that character budget, a call at offset 0 stages the match on a canvas regardless of this value.
stateYesTwo-letter US state code (required). NFIP dataset is 2.7M rows — state filter is mandatory.
offsetNoPagination offset into the matching claims, ordered newest date of loss first (default 0). Use with limit to page through a match. Only a call at offset 0 stages a match on a canvas; a later offset returns just its inline page. After a spill (spilled=true), read rows past the inline claims from the canvas table with fema_dataframe_query.
year_toNoEnd year of loss, inclusive (e.g., 2023).
zip_codeNoZIP code to narrow results to a specific area (5-digit, e.g., 77002).
canvas_idNoOptional canvas ID from a prior call, to stage this match as another table on that canvas. Used only when the match is staged; omit it to stage on a fresh canvas. Pass the returned canvas_id to fema_dataframe_describe for the table columns, then to fema_dataframe_query for SQL.
year_fromNoStart year of loss, inclusive (e.g., 2020).
county_codeNoCounty code to narrow results within the state. Accepts the full 5-digit state+county FIPS (e.g., 48201 for Harris County TX) or the 3-digit county portion (e.g., 201) when state is provided — the server prepends the state FIPS automatically.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
claimsNoClaims from offset onward, newest date of loss first, bounded by limit and 100,000 characters of claims. When spilled=true, canvas_table holds the staged match.
noticeNoPaging and canvas guidance: the offset to continue from when claims were left out, the last valid offset when offset is past the end, or the canvas table and dataframe tools after a spill.
spilledNoTrue when the match exceeded the inline budget and was staged on DataCanvas: call fema_dataframe_describe, then fema_dataframe_query, with canvas_id. False when nothing was staged.
canvas_idNoCanvas ID for the staged match. Pass to fema_dataframe_describe and fema_dataframe_query. Present only when spilled=true.
truncatedNoTrue when the 50,000-row canvas cap was reached: canvas_table holds staged_count of the total_count matching claims. Apply tighter filters (county_code, zip_code, year range) to stage the complete set.
total_countNoClaims matching the filters, as counted by OpenFEMA — before offset, limit, and the canvas row cap.
canvas_tableNoDuckDB table on the canvas holding the staged claims. List its columns with fema_dataframe_describe, then reference it in fema_dataframe_query FROM clauses. Present only when spilled=true.
staged_countNoClaims staged on canvas_table: the whole match, or its first 50,000 when truncated=true. Present only when spilled=true.
returned_countNoNumber of claim records in claims.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • changedInput schema / properties / canvas_id / description
      Previous value: -"Optional canvas ID from a prior call. Omit to create a fresh canvas. The response returns the canvas_id to pass to fema_dataframe_query."New value: +"Optional canvas ID from a prior call, to stage this match as another table on that canvas. Used only when the match is staged; omit it to stage on a fresh canvas. Pass the returned canvas_id to fema_dataframe_describe for the table columns, then to fema_dataframe_query for SQL."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum claim rows to return in the inline preview (1–10000, default 1000). When DataCanvas is enabled, the canvas stages the full matching result set regardless of this value."New value: +"Maximum claims to return inline (1–10000, default 1000). A page also stops at 100,000 characters of claims (roughly 330 claims); when either bound leaves matching claims out, the notice names the offset to continue from. When DataCanvas is enabled and the match exceeds that character budget, a call at offset 0 stages the match on a canvas regardless of this value."
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Pagination offset into the matching claims, ordered newest date of loss first (default 0). Use with limit to page through a match. Only a call at offset 0 stages a match on a canvas; a later offset returns just its inline page. After a spill (spilled=true), read rows past the inline claims from the canvas table with fema_dataframe_query.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / canvas_id / description
      Previous value: -"Canvas ID for the staged full result set. Pass to fema_dataframe_query and fema_dataframe_describe. Present only when spilled=true."New value: +"Canvas ID for the staged match. Pass to fema_dataframe_describe and fema_dataframe_query. Present only when spilled=true."
    • changedOutput schema / properties / canvas_table / description
      Previous value: -"DuckDB table name on the canvas holding all fetched rows. Reference in SQL FROM clauses. Present when spilled=true."New value: +"DuckDB table on the canvas holding the staged claims. List its columns with fema_dataframe_describe, then reference it in fema_dataframe_query FROM clauses. Present only when spilled=true."
    • changedOutput schema / properties / claims / description
      Previous value: -"Inline preview of claim records (first N rows). Full dataset available via canvas_id when spilled=true."New value: +"Claims from offset onward, newest date of loss first, bounded by limit and 100,000 characters of claims. When spilled=true, canvas_table holds the staged match."
    • changedOutput schema / properties / claims / items / properties / amount_paid_building / description
      Previous value: -"NFIP claim payment for the building structure in USD. Absent when zero or not recorded."New value: +"NFIP claim payment for the building structure in USD; 0 when the claim paid nothing on the building. Absent when not recorded."
    • changedOutput schema / properties / claims / items / properties / amount_paid_contents / description
      Previous value: -"NFIP claim payment for contents (personal property) in USD. Absent when zero or not recorded."New value: +"NFIP claim payment for contents (personal property) in USD; 0 when the claim paid nothing on contents. Absent when not recorded."
    • changedOutput schema / properties / claims / items / properties / cause_of_damage / description
      Previous value: -"Primary cause of the flood damage (e.g., \"Flooding\", \"Tidal Overflow\"). Absent when not recorded."New value: +"OpenFEMA cause-of-damage code, as published: 0 other causes; 1 tidal water overflow; 2 stream, river, or lake overflow; 3 alluvial fan overflow; 4 accumulation of rainfall or snowmelt; 7 erosion-demolition; 8 erosion-removal; 9 earth movement, landslide, land subsidence, sinkholes, etc.; A closed basin lake; B expedited claim handling without site inspection; C expedited claim handling follow-up site inspection; D expedited claim handling by the Adjusting Process Pilot Program (remote adjustment). Other values pass through unchanged. Absent when not recorded."
    • changedOutput schema / properties / claims / items / properties / occupancy_type / description
      Previous value: -"NFIP occupancy type code (e.g., 1=Single Family, 2=2-4 Family, 6=Non-Residential). Absent when not recorded."New value: +"NFIP occupancy type code, as published. Legacy codes: 1 single-family residence; 2 residential building with 2 to 4 units; 3 residential building with more than 4 units; 4 non-residential building; 6 non-residential business. Risk Rating 2.0 codes: 11 single-family residential building (except a mobile home or a single unit within a multi-unit building); 12 residential non-condo building with 2 to 4 units, insuring all units; 13 residential non-condo building with 5 or more units, insuring all units; 14 residential mobile or manufactured home; 15 residential condo association building; 16 single residential unit within a multi-unit building; 17 non-residential mobile or manufactured home; 18 non-residential building; 19 non-residential unit within a multi-unit building. Other values pass through unchanged. Absent when not recorded."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance on canvas usage or result scope."New value: +"Paging and canvas guidance: the offset to continue from when claims were left out, the last valid offset when offset is past the end, or the canvas table and dataframe tools after a spill."
    • changedOutput schema / properties / returned_count / description
      Previous value: -"Number of claim records in the inline preview."New value: +"Number of claim records in claims."
    • changedOutput schema / properties / spilled / description
      Previous value: -"True when the full result set was staged on DataCanvas; use canvas_id + fema_dataframe_query for SQL analysis. False when all results fit inline."New value: +"True when the match exceeded the inline budget and was staged on DataCanvas: call fema_dataframe_describe, then fema_dataframe_query, with canvas_id. False when nothing was staged."
    • addedOutput schema / properties / staged_count
      Added value: +{
      +  "description": "Claims staged on canvas_table: the whole match, or its first 50,000 when truncated=true. Present only when spilled=true.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / total_count / description
      Previous value: -"Total matching claims in the filtered dataset before the limit."New value: +"Claims matching the filters, as counted by OpenFEMA — before offset, limit, and the canvas row cap."
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when the canvas row cap (50,000) was reached before the full matching set was staged — the canvas holds a partial result. Apply tighter filters (county_code, zip_code, year range) to stage the complete set."New value: +"True when the 50,000-row canvas cap was reached: canvas_table holds staged_count of the total_count matching claims. Apply tighter filters (county_code, zip_code, year range) to stage the complete set."
  2. Changed1 schema field changed
    • addedInput schema / properties / canvas_id / pattern
      Added value: +"^[A-Za-z0-9_-]{10}$"
  3. Changed6 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": [
      +      "claims",
      +      "total_count",
      +      "returned_count",
      +      "spilled"
      +    ]
      +  },
      +  {
      +    "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: `invalid_state`: The state parameter is not a valid 2-letter US state/territory code. `no_results`: Query returned zero matching NFIP claims. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "invalid_state",
      +            "no_results"
      +          ],
      +          "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"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "claims",
      -  "total_count",
      -  "returned_count",
      -  "spilled"
      -]
  4. Changed2 schema fields changed
    • changedInput schema / properties / zip_code / description
      Previous value: -"ZIP code to narrow results to a specific area."New value: +"ZIP code to narrow results to a specific area (5-digit, e.g., 77002)."
    • addedInput schema / properties / zip_code / pattern
      Added value: +"^\\d{5}$"
  5. Changed5 schema fields changed
    • changedInput schema / properties / county_code / description
      Previous value: -"County code to narrow results within the state (e.g., 201 for Harris County TX). Use with state."New value: +"County code to narrow results within the state. Accepts the full 5-digit state+county FIPS (e.g., 48201 for Harris County TX) or the 3-digit county portion (e.g., 201) when state is provided — the server prepends the state FIPS automatically."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum rows to fetch (1–10000, default 1000)."New value: +"Maximum claim rows to return in the inline preview (1–10000, default 1000). When DataCanvas is enabled, the canvas stages the full matching result set regardless of this value."
    • changedOutput schema / properties / canvas_id / description
      Previous value: -"Canvas ID for the staged full result set. Pass to fema_dataframe_query and fema_dataframe_describe. Present when canvas is enabled."New value: +"Canvas ID for the staged full result set. Pass to fema_dataframe_query and fema_dataframe_describe. Present only when spilled=true."
    • changedOutput schema / properties / claims / items / properties / county_code / description
      Previous value: -"County code (e.g., 201 for Harris County TX). Absent when not recorded."New value: +"5-digit state+county FIPS code (e.g., 48201 for Harris County TX). Absent when not recorded."
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when the canvas row cap (50,000) was reached before all matching rows were staged. Apply tighter filters (county_code, zip_code, year range) for a complete set."New value: +"True when the canvas row cap (50,000) was reached before the full matching set was staged — the canvas holds a partial result. Apply tighter filters (county_code, zip_code, year range) to stage the complete set."
  6. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint and openWorldHint, and the description adds substantial behavioral detail beyond that: the 2.7M-row scale, the 100,000-character inline page limit, the staging behavior for offset 0 with up to 50,000 claims, and the requirement that state must be supplied. It also discloses an operational constraint ('unfiltered access is prohibited') that an agent needs to know before calling.

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 compact and front-loaded: the core search behavior and return contents come first, followed by the mandatory-state constraint, then pagination, then the conditional DataCanvas workflow. Every sentence carries operational value, and the structure lets an agent quickly decide whether and how to invoke the tool.

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?

For a tool with 8 parameters, one required parameter, an output schema, and integration with sibling tools, the description is complete: it covers mandatory input, output contents, ordering, pagination limits, overflow staging, and the exact sibling tools to use afterward. Even without the output schema, an agent would understand what to expect and how to proceed.

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 description coverage is 100%, so the schema already documents all parameters. The description adds important interaction semantics not present in the schema: how limit/offset page through inline results, the character-based page bound, and that only a call at offset 0 stages a match on a canvas when DataCanvas is enabled. This enriches the meaning of limit, offset, and canvas_id beyond their individual descriptions.

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 states a specific verb and resource — 'Search National Flood Insurance Program (NFIP) claims data' — and enumerates the exact filters and returned fields ('claim count and claim records — amounts paid on building and contents, damage estimates, flood zones, cause and occupancy codes, and loss dates'), plus ordering ('newest loss first'). It is clearly distinct from siblings and even names the downstream dataframe tools it coordinates with.

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?

It gives explicit usage context: 'state is required', 'unfiltered access is prohibited', and it explains when to switch to fema_dataframe_describe/fema_dataframe_query for staged matches beyond the inline budget. It does not explicitly contrast with fema_query_dataset or fema_search_disasters, but the dataset-specific purpose makes the intended use clear.

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.