fema-mcp-server
Qué hace este MCP
Searches and analyzes FEMA disaster declarations, assistance projects, housing aid, and National Flood Insurance Program claims.
Herramientas
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['canvas_id'], 'properties': {'canvas_id': {'type': 'string', 'pattern': '^[A-Za-z0-9_-]{10}$', 'description': 'Canvas ID from the fema_search_nfip response.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['tables', 'canvas_id']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['canvas_not_found', 'canvas_unavailable'], 'description': 'Machine-readable failure mode. Declared by this tool: `canvas_not_found`: The canvas_id does not correspond to an active canvas session. `canvas_unavailable`: DataCanvas is disabled on this deployment (CANVAS_PROVIDER_TYPE is not set to duckdb). Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'tables': {'type': 'array', 'items': {'type': 'object', 'required': ['name', 'kind', 'row_count', 'columns'], 'properties': {'kind': {'type': 'string', 'description': 'Object type: "table" for a registered data table, "view" for a derived view.'}, 'name': {'type': 'string', 'description': 'Table or view name â\x80\x94 use this exact string in SQL FROM clauses.'}, 'columns': {'type': 'array', 'items': {'type': 'object', 'required': ['name', 'type'], 'properties': {'name': {'type': 'string', 'description': 'Column name â\x80\x94 use in SELECT, WHERE, GROUP BY, and ORDER BY clauses.'}, 'type': {'type': 'string', 'description': 'DuckDB SQL data type (e.g., VARCHAR, DOUBLE, INTEGER, BOOLEAN).'}, 'nullable': {'type': 'boolean', 'description': 'True when the column can contain NULL values. Absent when nullability is unknown.'}}, 'description': 'A single column in the table.', 'additionalProperties': False}, 'description': 'All columns in this table, in schema order.'}, 'row_count': {'type': 'number', 'description': 'Total rows in this table â\x80\x94 the full staged result set, not the inline preview count.'}}, 'description': 'A single registered table or view on the canvas.', 'additionalProperties': False}, 'description': 'All tables and views available on this canvas.'}, 'canvas_id': {'type': 'string', 'description': 'Canvas ID that was described â\x80\x94 pass to fema_dataframe_query.'}}, 'additionalProperties': False}
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['canvas_id', 'query'], 'properties': {'query': {'type': 'string', 'description': 'SQL SELECT statement to run against the staged table. Use the table name from fema_dataframe_describe. Results are capped at the canvas row limit; append LIMIT/OFFSET to page through additional rows, or aggregate (GROUP BY, COUNT, SUM) to summarize the full set in one query. Example: "SELECT year_of_loss, COUNT(*) AS claims, SUM(amount_paid_building) AS total_building_paid FROM df_nfip_abc123 GROUP BY year_of_loss ORDER BY year_of_loss"'}, 'canvas_id': {'type': 'string', 'pattern': '^[A-Za-z0-9_-]{10}$', 'description': 'Canvas ID from the fema_search_nfip response (the canvas_id field).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['rows', 'row_count', 'canvas_id']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'cap': {'type': 'number', 'description': 'The canvas row limit that was applied when the result was capped.'}, 'rows': {'type': 'array', 'items': {'type': 'object', 'description': 'A single result row â\x80\x94 keys are column names from the SELECT, values are the computed data.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'description': 'Result rows from the query. May be capped at the canvas row limit â\x80\x94 when the truncated enrichment field is set, page the remainder with LIMIT/OFFSET (see the notice guidance).'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['sql_execution_error', 'canvas_not_found', 'canvas_unavailable', 'invalid_query'], 'description': 'Machine-readable failure mode. Declared by this tool: `sql_execution_error`: A SELECT fails while converting or calculating values in the staged data. `canvas_not_found`: The canvas_id does not correspond to an active canvas session. `canvas_unavailable`: DataCanvas is disabled on this deployment (CANVAS_PROVIDER_TYPE is not set to duckdb). `invalid_query`: The SQL statement is not a valid SELECT, references a non-existent table or column, or uses blocked operations. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'shown': {'type': 'number', 'description': 'Number of rows returned in this (capped) response.'}, 'notice': {'type': 'string', 'description': 'Continuation guidance when capped â\x80\x94 how to page the remainder with LIMIT/OFFSET.'}, 'canvas_id': {'type': 'string', 'description': 'Canvas ID that was queried â\x80\x94 reuse for follow-up queries.'}, 'row_count': {'type': 'number', 'description': 'Number of rows in this response (may be capped at the canvas row limit).'}, 'truncated': {'type': 'boolean', 'description': 'True when the result was capped at the canvas row limit â\x80\x94 more rows match than were returned.'}}, 'additionalProperties': False}
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['disaster_number'], 'properties': {'disaster_number': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'FEMA disaster number (e.g., 4781). Obtain from fema_search_disasters.', 'exclusiveMinimum': 0}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['disaster_number', 'title', 'state', 'incident_type', 'declaration_type', 'declaration_date', 'ia_declared', 'pa_declared', 'hm_declared', 'designated_areas', 'designated_area_count']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['not_found'], 'description': 'Machine-readable failure mode. Declared by this tool: `not_found`: No declaration found with the given disaster number. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'state': {'type': 'string', 'description': 'Two-letter state/territory code.'}, 'title': {'type': 'string', 'description': 'Official declaration title (e.g., "SEVERE STORMS AND FLOODING").'}, 'hm_declared': {'type': 'boolean', 'description': 'True when Hazard Mitigation grants were declared.'}, 'ia_declared': {'type': 'boolean', 'description': 'True when the Individuals and Households Program (IHP) was declared â\x80\x94 indicates IA housing/personal grants are available.'}, 'pa_declared': {'type': 'boolean', 'description': 'True when Public Assistance (infrastructure recovery grants) was declared.'}, 'incident_type': {'type': 'string', 'description': 'Type of incident (e.g., Flood, Hurricane, Severe Storm).'}, 'disaster_number': {'type': 'number', 'description': 'FEMA disaster number â\x80\x94 use as the chain key for PA and housing assistance tools.'}, 'declaration_date': {'type': 'string', 'description': 'ISO 8601 date the declaration was signed.'}, 'declaration_type': {'type': 'string', 'description': 'Declaration type: DR (major disaster), EM (emergency), or FM (fire management).'}, 'designated_areas': {'type': 'array', 'items': {'type': 'object', 'required': ['area'], 'properties': {'area': {'type': 'string', 'description': 'Name of the designated county or municipality.'}, 'fips_state_code': {'type': 'string', 'description': '2-digit state FIPS code. Absent when not returned.'}, 'fips_county_code': {'type': 'string', 'description': '3-digit county FIPS code. Absent when not returned.'}}, 'description': 'A single designated area entry.', 'additionalProperties': False}, 'description': 'All counties/municipalities designated for assistance under this declaration.'}, 'incident_end_date': {'type': 'string', 'description': 'ISO 8601 end date of the incident. Absent for ongoing or unrecorded incidents.'}, 'incident_begin_date': {'type': 'string', 'description': 'ISO 8601 start date of the incident. Absent when not recorded.'}, 'designated_area_count': {'type': 'number', 'description': 'Total number of designated areas in this declaration.'}}, 'additionalProperties': False}
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['disaster_number'], 'properties': {'type': {'enum': ['owners', 'renters', 'both'], 'type': 'string', 'default': 'both', 'description': 'Which housing assistance dataset to query: owners, renters, or both (default).'}, 'limit': {'type': 'integer', 'default': 100, 'maximum': 1000, 'minimum': 1, 'description': 'Maximum records per dataset to return (default 100).'}, 'state': {'type': 'string', 'maxLength': 2, 'minLength': 2, 'description': 'Two-letter state code to narrow results when a disaster spans multiple states.'}, 'offset': {'type': 'integer', 'default': 0, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Pagination offset (default 0).'}, 'disaster_number': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'FEMA disaster number. Obtain from fema_search_disasters. Numbers above 32767 match no declaration.', 'exclusiveMinimum': 0}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['owners', 'renters', 'owners_count', 'renters_count']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_state', 'not_found', 'no_results'], 'description': 'Machine-readable failure mode. Declared by this tool: `invalid_state`: The state parameter is not a valid 2-letter US state/territory code. `not_found`: The disaster number is above 32767, the highest number OpenFEMA holds, so no declaration exists. `no_results`: No IA housing records found for this disaster. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'notice': {'type': 'string', 'description': 'Paging guidance when offset is at or past the end of a queried dataset â\x80\x94 names its total and last valid offset.'}, 'owners': {'type': 'array', 'items': {'type': 'object', 'required': ['disaster_number'], 'properties': {'city': {'type': 'string', 'description': 'City name. Absent when not recorded.'}, 'state': {'type': 'string', 'description': 'Two-letter state code. Absent when not recorded.'}, 'county': {'type': 'string', 'description': 'County name. Absent when not recorded.'}, 'zip_code': {'type': 'string', 'description': '5-digit ZIP code; 00000 when OpenFEMA files the records under no ZIP code. Absent when not recorded.'}, 'rental_amount': {'type': 'number', 'description': 'Rental assistance granted in USD; 0 when none was. Absent when not reported.'}, 'disaster_number': {'type': 'number', 'description': 'FEMA disaster number this record belongs to.'}, 'other_needs_amount': {'type': 'number', 'description': 'Other needs assistance (personal property, transportation, etc.) in USD; 0 when none was approved. Absent when not reported.'}, 'valid_registrations': {'type': 'number', 'description': 'Number of valid IA registrations from homeowners in this area. Absent when not reported.'}, 'repair_replace_amount': {'type': 'number', 'description': 'Home repair and replacement assistance in USD; 0 when none was approved. Absent when not reported.'}, 'total_approved_ihp_amount': {'type': 'number', 'description': 'Total Individuals and Households Program (IHP) assistance approved in USD; 0 when none was. Absent when not reported.'}, 'approved_for_fema_assistance': {'type': 'number', 'description': 'Number of homeowner registrations approved for any FEMA assistance; 0 when none were. Absent when not reported.'}}, 'description': 'Homeowner housing assistance aggregated by county and ZIP for one disaster.', 'additionalProperties': False}, 'description': 'Homeowner (HousingAssistanceOwners) records. Empty when type is "renters" or no owner data exists.'}, 'renters': {'type': 'array', 'items': {'type': 'object', 'required': ['disaster_number'], 'properties': {'city': {'type': 'string', 'description': 'City name. Absent when not recorded.'}, 'state': {'type': 'string', 'description': 'Two-letter state code. Absent when not recorded.'}, 'county': {'type': 'string', 'description': 'County name. Absent when not recorded.'}, 'zip_code': {'type': 'string', 'description': '5-digit ZIP code; 00000 when OpenFEMA files the records under no ZIP code. Absent when not recorded.'}, 'rental_amount': {'type': 'number', 'description': 'Rental assistance granted in USD; 0 when none was. Absent when not reported.'}, 'disaster_number': {'type': 'number', 'description': 'FEMA disaster number this record belongs to.'}, 'other_needs_amount': {'type': 'number', 'description': 'Other needs assistance in USD; 0 when none was approved. Absent when not reported.'}, 'valid_registrations': {'type': 'number', 'description': 'Number of valid IA registrations from renters in this area. Absent when not reported.'}, 'total_approved_ihp_amount': {'type': 'number', 'description': 'Total IHP assistance approved for renters in USD; 0 when none was. Absent when not reported.'}, 'approved_for_fema_assistance': {'type': 'number', 'description': 'Number of renter registrations approved for any FEMA assistance; 0 when none were. Absent when not reported.'}}, 'description': 'Renter housing assistance aggregated by county and ZIP for one disaster.', 'additionalProperties': False}, 'description': 'Renter (HousingAssistanceRenters) records. Empty when type is "owners" or no renter data exists.'}, 'totalCount': {'type': 'number', 'description': 'Total owner + renter records available before the per-dataset limit â\x80\x94 exceeds the returned count when either dataset was capped.'}, 'owners_count': {'type': 'number', 'description': 'Total owner records available before the per-dataset limit.'}, 'renters_count': {'type': 'number', 'description': 'Total renter records available before the per-dataset limit.'}}, 'additionalProperties': False}
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'limit': {'type': 'integer', 'default': 100, 'maximum': 1000, 'minimum': 1, 'description': 'Maximum number of projects to return (1â\x80\x931000, default 100).'}, 'state': {'type': 'string', 'maxLength': 2, 'minLength': 2, 'description': 'Two-letter state code to browse all PA projects for a state.'}, 'county': {'type': 'string', 'description': 'Filter by county name substring.'}, 'offset': {'type': 'integer', 'default': 0, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Pagination offset (default 0).'}, 'disaster_number': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'FEMA disaster number to scope results to a single declaration. Numbers above 32767 match no declaration.', 'exclusiveMinimum': 0}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['projects', 'total_count', 'returned_count']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_state', 'missing_filter', 'not_found', 'no_results'], 'description': 'Machine-readable failure mode. Declared by this tool: `invalid_state`: The state parameter is not a valid 2-letter US state/territory code. `missing_filter`: Neither disaster_number nor state was provided. `not_found`: The disaster number is above 32767, the highest number OpenFEMA holds, so no declaration exists. `no_results`: No PA project records found for the given filters. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'notice': {'type': 'string', 'description': 'Paging guidance when offset is at or past the end of the matching projects â\x80\x94 names the total and the last valid offset.'}, 'projects': {'type': 'array', 'items': {'type': 'object', 'required': ['disaster_number'], 'properties': {'state': {'type': 'string', 'description': 'Two-letter state abbreviation. Absent when not recorded.'}, 'county': {'type': 'string', 'description': 'County where the project is located. Absent when not recorded.'}, 'pw_number': {'type': 'number', 'description': 'Project Worksheet number assigned by FEMA. Absent when not yet assigned.'}, 'applicant_id': {'type': 'string', 'description': 'FEMA applicant identifier for the recipient organization. Absent when not recorded.'}, 'project_size': {'type': 'string', 'description': 'Project size classification: "small" (â\x89¤$1M) or "large" (>$1M). Absent when unclassified.'}, 'project_amount': {'type': 'number', 'description': 'Total estimated project cost in USD. Absent when not yet determined.'}, 'project_status': {'type': 'string', 'description': 'Current project status (e.g., Obligated, Closed, In Progress). Absent when not set.'}, 'disaster_number': {'type': 'number', 'description': 'FEMA disaster number this project belongs to.'}, 'total_obligated': {'type': 'number', 'description': 'Total obligated amount across all funding sources in USD; 0 when nothing is obligated.'}, 'application_title': {'type': 'string', 'description': 'Name of the applicant organization or project. Absent when not recorded.'}, 'damage_category_code': {'type': 'string', 'description': 'FEMA damage category code (e.g., A=Debris Removal, B=Emergency Protective Measures, C=Roads and Bridges). Absent when unclassified.'}, 'first_obligation_date': {'type': 'string', 'description': 'ISO 8601 date the first federal obligation was recorded. Absent before obligation.'}, 'federal_share_obligated': {'type': 'number', 'description': 'Federal dollars obligated for this project in USD; 0 when nothing is obligated.'}, 'damage_category_description': {'type': 'string', 'description': 'Human-readable name for the damage category code. Absent when unclassified.'}}, 'description': 'A single Public Assistance funded project record.', 'additionalProperties': False}, 'description': 'Public assistance funded project records.'}, 'totalCount': {'type': 'number', 'description': 'Total matching projects before pagination â\x80\x94 exceeds returned_count when results were capped at the limit.'}, 'total_count': {'type': 'number', 'description': 'Total matching projects before pagination.'}, 'returned_count': {'type': 'number', 'description': 'Number of projects in this response.'}}, 'additionalProperties': False}
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['dataset'], 'properties': {'limit': {'type': 'integer', 'default': 100, 'maximum': 10000, 'minimum': 1, 'description': 'Maximum records to return (1â\x80\x9310000, default 100).'}, 'filter': {'type': 'string', 'description': 'OData $filter expression (e.g., "state eq \'TX\' and declarationDate ge \'2024-01-01T00:00:00.000Z\'"). String values in single quotes.'}, 'offset': {'type': 'integer', 'default': 0, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Pagination offset (default 0).'}, 'select': {'type': 'string', 'description': 'Comma-separated field names to return (e.g., "disasterNumber,state,declarationDate").'}, 'dataset': {'type': 'string', 'minLength': 1, 'description': 'OpenFEMA dataset entity name (case-sensitive, e.g., NfipPolicies, FemaWebDeclarationAreas, PublicAssistanceApplicants).'}, 'orderby': {'type': 'string', 'description': 'OData $orderby expression (e.g., "declarationDate desc").'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['dataset', 'rows', 'total_count', 'returned_count']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'rows': {'type': 'array', 'items': {'type': 'object', 'properties': {}, 'description': 'A single record from the queried dataset. Field names and types vary by dataset.', 'additionalProperties': {}}, 'description': 'Records returned from the dataset. Field names depend on the queried dataset.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['unknown_dataset', 'dataset_not_served', 'catalog_unavailable', 'invalid_filter', 'invalid_select', 'invalid_orderby', 'invalid_odata_syntax'], 'description': 'Machine-readable failure mode. Declared by this tool: `unknown_dataset`: The dataset name is not in the OpenFEMA dataset catalog. `dataset_not_served`: The OpenFEMA dataset catalog lists the dataset, but OpenFEMA answers its API endpoint with a 404 page. `catalog_unavailable`: The OpenFEMA dataset catalog could not be read, so the dataset API version is unknown. `invalid_filter`: OpenFEMA rejected the filter expression â\x80\x94 an unknown field, a value of the wrong type or range, or unparseable syntax. `invalid_select`: OpenFEMA rejected the select list â\x80\x94 an unknown field or unparseable syntax. `invalid_orderby`: OpenFEMA rejected the orderby expression â\x80\x94 an unknown field or unparseable syntax. `invalid_odata_syntax`: OpenFEMA could not parse the request and did not say whether filter, select, or orderby was at fault. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'notice': {'type': 'string', 'description': 'Guidance on an empty page â\x80\x94 filter advice when nothing matches, or the total and last valid offset when offset is at or past the end.'}, 'dataset': {'type': 'string', 'description': 'The dataset that was queried.'}, 'totalCount': {'type': 'number', 'description': 'Total matching records before pagination â\x80\x94 exceeds returned_count when results were capped at the limit.'}, 'total_count': {'type': 'number', 'description': 'Total matching records before pagination.'}, 'returned_count': {'type': 'number', 'description': 'Number of records in this response.'}}, 'additionalProperties': False}
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'limit': {'type': 'integer', 'default': 50, 'maximum': 1000, 'minimum': 1, 'description': 'Maximum number of unique disaster declarations to return (1â\x80\x931000, default 50).'}, 'state': {'type': 'string', 'maxLength': 2, 'minLength': 2, 'description': 'Two-letter US state/territory code (e.g., TX, CA, FL, PR). Filters by state.'}, 'county': {'type': 'string', 'description': 'Filter by designated area / county name substring (e.g., Harris, Los Angeles). Case-insensitive.'}, 'offset': {'type': 'integer', 'default': 0, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Pagination offset in declarations (default 0). Use with limit to page through results.'}, 'date_to': {'anyOf': [{'type': 'string', 'const': ''}, {'type': 'string', 'format': 'date', 'pattern': '^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$', 'description': 'Calendar date, YYYY-MM-DD.'}], 'description': 'End of the declaration date range as a calendar date in YYYY-MM-DD format (e.g., 2024-12-31). Inclusive.'}, 'date_from': {'anyOf': [{'type': 'string', 'const': ''}, {'type': 'string', 'format': 'date', 'pattern': '^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$', 'description': 'Calendar date, YYYY-MM-DD.'}], 'description': 'Start of the declaration date range as a calendar date in YYYY-MM-DD format (e.g., 2024-01-01). Inclusive.'}, 'incident_type': {'type': 'string', 'description': 'Incident type filter (e.g., Flood, Hurricane, Tornado, Fire, Earthquake, Severe Storm). Case-insensitive substring match.'}, 'declaration_type': {'enum': ['DR', 'EM', 'FM'], 'type': 'string', 'description': 'Declaration type: DR (major disaster declaration), EM (emergency declaration), FM (fire management assistance declaration).'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['declarations', 'total_declarations', 'total_area_rows', 'returned_count']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_state', 'no_results'], '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 disaster declarations. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'notice': {'type': 'string', 'description': 'Paging guidance: when offset is at or past the end of the matching declarations, the total and the last valid offset; when truncated is true, that the totals are lower bounds and the date_to (YYYY-MM-DD) to search next for older declarations.'}, 'truncated': {'type': 'boolean', 'description': 'True when more than 10,000 designated-area rows match: the search covers only the declarations dated after the day its 10,000-row window ends. Each returned declaration is complete, the totals are lower bounds, and the notice names the date_to that continues with older declarations. Absent otherwise.'}, 'totalCount': {'type': 'number', 'description': 'Unique disaster declarations matching the query â\x80\x94 the unit declaration-level pagination pages over. Exceeds returned_count when the matches span more than one page. A lower bound when truncated is true.'}, 'declarations': {'type': 'array', 'items': {'type': 'object', 'required': ['disaster_number', 'title', 'state', 'incident_type', 'declaration_type', 'declaration_date', 'ia_declared', 'pa_declared', 'hm_declared', 'designated_area_count'], 'properties': {'state': {'type': 'string', 'description': 'Two-letter state/territory code.'}, 'title': {'type': 'string', 'description': 'Official declaration title (e.g., "SEVERE STORMS AND FLOODING").'}, 'hm_declared': {'type': 'boolean', 'description': 'True when Hazard Mitigation grants were declared.'}, 'ia_declared': {'type': 'boolean', 'description': 'True when the Individuals and Households Program (IHP) was declared â\x80\x94 indicates IA housing/personal grants are available.'}, 'pa_declared': {'type': 'boolean', 'description': 'True when Public Assistance (infrastructure recovery grants) was declared.'}, 'incident_type': {'type': 'string', 'description': 'Type of incident (e.g., Flood, Hurricane, Tornado, Severe Storm).'}, 'disaster_number': {'type': 'number', 'description': 'Unique FEMA disaster number â\x80\x94 pass to fema_get_disaster, fema_get_public_assistance, or fema_get_housing_assistance.'}, 'declaration_date': {'type': 'string', 'description': 'ISO 8601 date the declaration was signed.'}, 'declaration_type': {'type': 'string', 'description': 'Declaration type: DR (major disaster), EM (emergency), or FM (fire management).'}, 'incident_end_date': {'type': 'string', 'description': 'ISO 8601 incident end date. Absent for ongoing or unrecorded incidents.'}, 'incident_begin_date': {'type': 'string', 'description': 'ISO 8601 incident start date. Absent when not recorded.'}, 'designated_area_count': {'type': 'number', 'description': 'Number of counties/municipalities designated â\x80\x94 use fema_get_disaster for the full area list.'}}, 'description': 'Deduplicated summary for one disaster declaration.', 'additionalProperties': False}, 'description': 'Disaster declarations matching the search, one entry per unique disaster number.'}, 'returned_count': {'type': 'number', 'description': 'Number of unique deduplicated declarations in this response.'}, 'total_area_rows': {'type': 'number', 'description': 'Total matching designated-area rows from the API (raw row count, not declaration count). DisasterDeclarationsSummaries returns one row per designated area per disaster, so this is always â\x89¥ the number of unique declarations. When it exceeds 10,000, the search reads the most recent 10,000 rows and drops the declarations dated on the oldest day among them, so every returned declaration is complete; the notice names the date_to that continues with older declarations.'}, 'total_declarations': {'type': 'number', 'description': 'Unique disaster declarations matching the query, before offset/limit paging â\x80\x94 the bound for declaration-level pagination (limit/offset apply to declarations, not area rows). A lower bound when truncated is true: it counts only the declarations dated after the day the 10,000-row window ends.'}}, 'additionalProperties': False}
Esquema de entrada
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['state'], 'properties': {'limit': {'type': 'integer', 'default': 1000, 'maximum': 10000, 'minimum': 1, 'description': 'Maximum claims to return inline (1â\x80\x9310000, 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.'}, 'state': {'type': 'string', 'maxLength': 2, 'minLength': 2, 'description': 'Two-letter US state code (required). NFIP dataset is 2.7M rows â\x80\x94 state filter is mandatory.'}, 'offset': {'type': 'integer', 'default': 0, 'maximum': 9007199254740991, 'minimum': 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.'}, 'year_to': {'type': 'integer', 'maximum': 2100, 'minimum': 1970, 'description': 'End year of loss, inclusive (e.g., 2023).'}, 'zip_code': {'type': 'string', 'pattern': '^\\d{5}$', 'description': 'ZIP code to narrow results to a specific area (5-digit, e.g., 77002).'}, 'canvas_id': {'type': 'string', 'pattern': '^[A-Za-z0-9_-]{10}$', 'description': '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.'}, 'year_from': {'type': 'integer', 'maximum': 2100, 'minimum': 1970, 'description': 'Start year of loss, inclusive (e.g., 2020).'}, 'county_code': {'type': 'string', 'description': '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 â\x80\x94 the server prepends the state FIPS automatically.'}}, 'additionalProperties': False}
Esquema de salida
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['claims', 'total_count', 'returned_count', 'spilled']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_state', 'no_results'], '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.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'claims': {'type': 'array', 'items': {'type': 'object', 'properties': {'state': {'type': 'string', 'description': 'Two-letter state code. Absent when not in the record.'}, 'zip_code': {'type': 'string', 'description': '5-digit ZIP code of the insured property. Absent when not recorded.'}, 'county_code': {'type': 'string', 'description': '5-digit state+county FIPS code (e.g., 48201 for Harris County TX). Absent when not recorded.'}, 'date_of_loss': {'type': 'string', 'description': 'ISO 8601 date the flood loss occurred. Absent when not recorded.'}, 'year_of_loss': {'type': 'number', 'description': 'Calendar year the flood loss occurred. Absent when not recorded.'}, 'occupancy_type': {'type': 'number', 'description': '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.'}, 'cause_of_damage': {'type': 'string', 'description': '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.'}, 'rated_flood_zone': {'type': 'string', 'description': 'FEMA flood zone designation at the property (e.g., AE, X, VE). Absent when not recorded.'}, 'amount_paid_building': {'type': 'number', 'description': 'NFIP claim payment for the building structure in USD; 0 when the claim paid nothing on the building. Absent when not recorded.'}, 'amount_paid_contents': {'type': 'number', 'description': 'NFIP claim payment for contents (personal property) in USD; 0 when the claim paid nothing on contents. Absent when not recorded.'}, 'building_damage_amount': {'type': 'number', 'description': 'Estimated total building damage in USD (may exceed paid amount). Absent when not assessed.'}, 'contents_damage_amount': {'type': 'number', 'description': 'Estimated total contents damage in USD (may exceed paid amount). Absent when not assessed.'}}, 'description': 'A single NFIP flood insurance claim record.', 'additionalProperties': False}, 'description': '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.'}, 'notice': {'type': 'string', 'description': '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.'}, 'spilled': {'type': 'boolean', 'description': '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.'}, 'canvas_id': {'type': 'string', 'description': 'Canvas ID for the staged match. Pass to fema_dataframe_describe and fema_dataframe_query. Present only when spilled=true.'}, 'truncated': {'type': 'boolean', 'description': '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.'}, 'total_count': {'type': 'number', 'description': 'Claims matching the filters, as counted by OpenFEMA â\x80\x94 before offset, limit, and the canvas row cap.'}, 'canvas_table': {'type': 'string', 'description': '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.'}, 'staged_count': {'type': 'number', 'description': 'Claims staged on canvas_table: the whole match, or its first 50,000 when truncated=true. Present only when spilled=true.'}, 'returned_count': {'type': 'number', 'description': 'Number of claim records in claims.'}}, 'additionalProperties': False}
Cambios recientes en herramientas
Servidores MCP similares
LiveDataLink
Exposes public-data tools covering economics, labor, banking, transport, books, legal opinions, carriers, environmental data, and…
AlpineDataWorks Intelligence Server
Provides economic, market, supply-chain, real-estate, energy, consumer, labor, and other scored intelligence indices with histori…
SharksAPI.AI
Provides marketing analytics and actions across GA4, Search Console, Google Ads, social channels, SEO, WordPress, and marketing p…
synter-ads
Manages cross-platform advertising campaigns, audiences, tracking, creative, landing pages, campaign audits, technology intellige…
synter-ads
Manages cross-platform advertising campaigns, audiences, tracking, creative, landing pages, campaign audits, technology intellige…
Stratalize Finance
Provides financial, macroeconomic, banking, credit, commodities, M&A, ESG, labor, and regulatory benchmarks for analysis and plan…
Stratalize Healthcare
Retired Stratalize server exposing benchmark, market intelligence, compliance, financial, healthcare, legal, real estate, and eco…
Stratalize Governance
Retired Stratalize server exposing benchmark, market intelligence, compliance, financial, healthcare, legal, real estate, and eco…