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, and while claims remain past it, next_offset is the offset to continue from. When DataCanvas is enabled 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

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, next_offset 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). Pass the previous page’s next_offset to continue. 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). Equal to year_from for a single year.
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). Not after year_to.
county_codeNoCounty FIPS code to narrow results within the state: the full 5-digit state+county code (e.g., 48201 for Harris County TX), or the 3-digit county part (e.g., 201), to which the server prepends the state FIPS. A shorter county part is zero-padded to 3 digits (1 → 001), and a 4-digit code is zero-padded to 5 (1001 → 01001), the form a numeric 01001 arrives in. Any other value is rejected before the search runs.

Output 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.
noticeNoZero-match, paging, and canvas guidance, composed with county-coverage disclosure: a state/year count of claims without county codes when already available, or an unchecked-coverage notice; this count does not identify any county or ZIP.
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.
next_offsetNoOffset of the next inline page: offset plus returned_count. Present only while matching claims remain past this page, after a spill too; pass it as offset to continue.
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. Changed3 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_state`: The state parameter is not a valid 2-letter US state/territory code. `invalid_county_code`: county_code is not 1–5 digits, or is a 1–3-digit county part for a state with no FIPS code (FM, MH, PW). `invalid_range`: year_from is later than year_to, so no claim could match. `no_results`: Query returned zero matching NFIP claims. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_state`: The state parameter is not a valid 2-letter US state/territory code. `invalid_county_code`: county_code is not 1–5 digits, or is a 1–3-digit county part for a state with no FIPS code (FM, MH, PW). `invalid_range`: year_from is later than year_to, so no claim could match. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_state",
      -  "invalid_county_code",
      -  "invalid_range",
      -  "no_results"
      -]New value: +[
      +  "invalid_state",
      +  "invalid_county_code",
      +  "invalid_range"
      +]
    • changedOutput schema / properties / notice / description
      Previous 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."New value: +"Zero-match, paging, and canvas guidance, composed with county-coverage disclosure: a state/year count of claims without county codes when already available, or an unchecked-coverage notice; this count does not identify any county or ZIP."
  2. Changed8 schema fields changed
    • changedInput schema / properties / county_code / description
      Previous 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."New value: +"County FIPS code to narrow results within the state: the full 5-digit state+county code (e.g., 48201 for Harris County TX), or the 3-digit county part (e.g., 201), to which the server prepends the state FIPS. A shorter county part is zero-padded to 3 digits (1 → 001), and a 4-digit code is zero-padded to 5 (1001 → 01001), the form a numeric 01001 arrives in. Any other value is rejected before the search runs."
    • changedInput schema / properties / limit / description
      Previous 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."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, next_offset 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."
    • changedInput schema / properties / offset / description
      Previous value: -"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."New value: +"Pagination offset into the matching claims, ordered newest date of loss first (default 0). Pass the previous page’s next_offset to continue. 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."
    • changedInput schema / properties / year_from / description
      Previous value: -"Start year of loss, inclusive (e.g., 2020)."New value: +"Start year of loss, inclusive (e.g., 2020). Not after year_to."
    • changedInput schema / properties / year_to / description
      Previous value: -"End year of loss, inclusive (e.g., 2023)."New value: +"End year of loss, inclusive (e.g., 2023). Equal to year_from for a single year."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"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."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_state`: The state parameter is not a valid 2-letter US state/territory code. `invalid_county_code`: county_code is not 1–5 digits, or is a 1–3-digit county part for a state with no FIPS code (FM, MH, PW). `invalid_range`: year_from is later than year_to, so no claim could match. `no_results`: Query returned zero matching NFIP claims. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "invalid_state",
      -  "no_results"
      -]New value: +[
      +  "invalid_state",
      +  "invalid_county_code",
      +  "invalid_range",
      +  "no_results"
      +]
    • addedOutput schema / properties / next_offset
      Added value: +{
      +  "description": "Offset of the next inline page: offset plus returned_count. Present only while matching claims remain past this page, after a spill too; pass it as offset to continue.",
      +  "type": "number"
      +}
  3. 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."
  4. Changed1 schema field changed
    • addedInput schema / properties / canvas_id / pattern
      Added value: +"^[A-Za-z0-9_-]{10}$"
  5. 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"
      -]
  6. 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}$"
  7. 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."
  8. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: discloses result ordering (newest loss first), the 100,000-character page budget (~330 rows), the 50,000-claim staging cap, that only offset 0 stages a match, and that later offsets return only their inline page. These are non-obvious behaviors an agent could not infer from annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Information is front-loaded (what it does, then the mandatory state constraint, then paging, then the canvas escalation path). It is dense and sentence-long with heavy em-dash use, but nearly every clause carries distinct operational information.

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?

Covers the high-complexity cases an 8-parameter search tool needs: mandatory filter, ordering, pagination overflow, and the DataCanvas escalation path with its sibling tools. An agent can invoke it correctly on the first try without reading the schema alone.

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 coverage is already 100%, so the schema carries most parameter documentation. The description still adds decision-relevant meaning: it ties limit/offset to the character budget and next_offset continuation, and explains the canvas_id staging semantics in workflow terms rather than field-definition terms.

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?

States a specific verb (search), a specific dataset (NFIP flood insurance claims), and the exact filter dimensions and returned fields. It is clearly distinguishable from the generic fema_query_dataset and from the disaster/housing-assistance siblings.

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

Usage Guidelines5/5

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

Explicitly states state is required and why (2.7M rows, unfiltered access prohibited), explains how to page inline results with limit/offset and next_offset, and names the follow-on tools (fema_dataframe_describe, fema_dataframe_query) for the DataCanvas-staged path. When-to-use conditions for both the inline and the canvas route are spelled out.

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.