{"tools":[{"name":"set_location","description":"Set the user's location by street address or coordinates. Returns the geocode (lat/lng) and juricode — a stack of jurisdiction IDs from federal down to municipal. Use the returned jurisdiction_ids to scope subsequent search queries. The juricode holds every layer, unfiltered. County subdivisions (level \"county_subdivision\") may be statistical areas that govern nothing (e.g. a California census county division), not towns or townships. Each one carries census_funcstat, census_lsad, kind and kind_label: kind is \"governing\" (Census FUNCSTAT A, an active town/township government), \"non_governing\" (statistical or inactive) or \"unclassified\" (no FUNCSTAT stored yet); kind_label names it (e.g. \"Charter Township\", \"Census County Division\"). Citizen-facing juricode views hide non_governing county subdivisions; filter on kind to match them.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"address":{"type":"string","description":"Street address to geocode (e.g., '300 Hemlock Ave, Vacaville, CA 95688'), or a plus code: full ('849VCWC8+R9') or short with its town ('CWC8+R9 Vacaville, CA')"},"latitude":{"maximum":90,"type":"number","description":"Latitude coordinate (use instead of address)","minimum":-90},"longitude":{"maximum":180,"type":"number","description":"Longitude coordinate (use instead of address)","minimum":-180}}}},{"name":"explore","description":"Search civic data with jurisdiction scoping and topic filtering. Pass jurisdiction_ids from set_location to scope results to relevant governments. Use focus to choose entity type and topic to narrow by subject area. With focus \"people\", a district's people are the holders of the seats it elects (electing_jurisdiction_id), e.g. the supervisor for a supervisorial district; each current position carries position_id and electing_jurisdiction_id. With focus \"governance\": County subdivisions (level \"county_subdivision\") may be statistical areas that govern nothing (e.g. a California census county division), not towns or townships. Each one carries census_funcstat, census_lsad, kind and kind_label: kind is \"governing\" (Census FUNCSTAT A, an active town/township government), \"non_governing\" (statistical or inactive) or \"unclassified\" (no FUNCSTAT stored yet); kind_label names it (e.g. \"Charter Township\", \"Census County Division\"). Citizen-facing juricode views hide non_governing county subdivisions; filter on kind to match them.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["focus"],"properties":{"query":{"type":"string","description":"Free text search within the chosen focus (optional)"},"limit":{"default":10,"maximum":50,"type":"integer","description":"Maximum number of results","minimum":1},"topic":{"type":"string","enum":["housing","health","education","safety","permits","elections","taxes","benefits","employment","utilities","recreation","transportation"],"description":"Subject area filter (optional)"},"focus":{"type":"string","enum":["services","agencies","people","bodies","governance"],"description":"What type of entity to search"},"jurisdiction_ids":{"type":"array","description":"Jurisdiction IDs to scope results (from set_location). Omit to search all jurisdictions.","items":{"type":"integer"}}}}},{"name":"search_jurisdictions","description":"Search for jurisdictions by name or location. Returns basic information about matching jurisdictions including name, level, state and geographic details. Short names (\"Lake\", \"West\") match many states: pass state to narrow them. Cities, towns and villages are level \"place\"; level \"municipal\" matches places too. County subdivisions (level \"county_subdivision\") may be statistical areas that govern nothing (e.g. a California census county division), not towns or townships. Each one carries census_funcstat, census_lsad, kind and kind_label: kind is \"governing\" (Census FUNCSTAT A, an active town/township government), \"non_governing\" (statistical or inactive) or \"unclassified\" (no FUNCSTAT stored yet); kind_label names it (e.g. \"Charter Township\", \"Census County Division\"). Citizen-facing juricode views hide non_governing county subdivisions; filter on kind to match them.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["query"],"properties":{"offset":{"default":0,"type":"integer","description":"Number of results to skip (for pagination)","minimum":0},"state":{"type":"string","description":"Two-letter state abbreviation to limit results, case-insensitive (e.g. 'MS'). Omit for all states."},"level":{"type":"string","enum":["federal","state","county","county_district","place","city_council_district","congressional_district","state_legislative_upper","state_legislative_lower","board_of_equalization_district","county_subdivision","consolidated_city","school_district_unified","school_district_elementary","school_district_secondary","school_district_admin","tribal","tribal_block_group","municipal","special_district","other"],"description":"Filter by jurisdiction level (optional). Cities are \"place\"; \"municipal\" matches places too."},"query":{"type":"string","description":"Search query (jurisdiction name or partial name)"},"limit":{"default":10,"maximum":100,"type":"integer","description":"Maximum number of results to return","minimum":1}}}},{"name":"get_jurisdiction_details","description":"Get detailed information about a specific jurisdiction by ID, or by its Open Civic Data division id (ocd_id). Returns comprehensive data including agencies, services, geographic boundaries, demographics, and related jurisdictions. elected_seats lists the seats this jurisdiction's voters elect (positions whose electing_jurisdiction_id is it, e.g. the supervisor a supervisorial district elects), each with its body and current_holder. A place (level \"place\") carries census_classfp, census_funcstat, census_lsad and kind: kind is \"governing\" (Census FUNCSTAT A or B, a city, town or village with its own government), \"non_governing\" (FUNCSTAT S, every census-designated place, or inactive) or \"unclassified\" (no FUNCSTAT stored). County subdivisions (level \"county_subdivision\") may be statistical areas that govern nothing (e.g. a California census county division), not towns or townships. Each one carries census_funcstat, census_lsad, kind and kind_label: kind is \"governing\" (Census FUNCSTAT A, an active town/township government), \"non_governing\" (statistical or inactive) or \"unclassified\" (no FUNCSTAT stored yet); kind_label names it (e.g. \"Charter Township\", \"Census County Division\"). Citizen-facing juricode views hide non_governing county subdivisions; filter on kind to match them.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the jurisdiction"},"ocd_id":{"type":"string","description":"Open Civic Data division id instead of id, e.g. ocd-division/country:us/state:ca/place:vacaville"}}}},{"name":"find_jurisdictions_at_point","description":"Find all jurisdictions that contain a specific latitude/longitude point. Useful for answering 'What jurisdictions am I in?' based on GPS coordinates. Returns every layer, unfiltered. County subdivisions (level \"county_subdivision\") may be statistical areas that govern nothing (e.g. a California census county division), not towns or townships. Each one carries census_funcstat, census_lsad, kind and kind_label: kind is \"governing\" (Census FUNCSTAT A, an active town/township government), \"non_governing\" (statistical or inactive) or \"unclassified\" (no FUNCSTAT stored yet); kind_label names it (e.g. \"Charter Township\", \"Census County Division\"). Citizen-facing juricode views hide non_governing county subdivisions; filter on kind to match them.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"maximum":90,"type":"number","description":"Latitude coordinate","minimum":-90},"longitude":{"maximum":180,"type":"number","description":"Longitude coordinate","minimum":-180}}}},{"name":"get_pending_tasks","description":"Get prioritized sourcing tasks for a jurisdiction — specific things jurisdictional.org needs help with. Returns tasks like 'verify the water district phone number' or 'find the city council meeting schedule'. Use this to show users concrete ways they can contribute for their area. Tasks can be completed and submitted back using the submit_sourcing_result tool. With no stored task, it returns the jurisdiction's coverage gaps as tasks, naming the agencies that still lack a phone or website (leaving out those with a value already in review).","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["jurisdiction_id"],"properties":{"limit":{"default":5,"maximum":20,"type":"integer","description":"Maximum number of tasks to return","minimum":1},"jurisdiction_id":{"type":"integer","description":"ID of the jurisdiction to fetch tasks for"},"task_type":{"type":"string","enum":["discover_agencies","extract_agency_contacts","discover_bodies","extract_officials","extract_services","extract_meeting_schedule","verify_stale_data","resolve_url","extract_budget"],"description":"Filter by task type (optional)"}}}},{"name":"get_coverage","description":"Get entity coverage summary and contribution recommendations for a jurisdiction. Returns counts per entity layer (agencies, bodies, positions, people, services, places: parks, libraries and schools, elected_seats and elected_seats_held: the seats this jurisdiction's voters elect and how many have a current holder) and data quality metrics (missing contacts, empty descriptions). Recommendations depend on the level: for an electoral district (county_district, city_council_district, board_of_equalization_district, congressional_district, state_legislative_upper, state_legislative_lower) the gap is who holds the seat it elects; for a state, agency contacts come before services. Use this to show users where the biggest gaps are and what to work on next.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["jurisdiction_id"],"properties":{"jurisdiction_id":{"type":"integer","description":"ID of the jurisdiction to assess"}}}},{"name":"get_next_uncovered","description":"Returns the highest-priority jurisdictions at a coverage level (default: zero agencies) — the best next targets for data gathering. Ordered by population (largest first, unknown population last, then name) for every coverage; special districts, which have no population, by whether they have a Census website, then name. For level place it returns only places with a government of their own (Census FUNCSTAT A or B), never census-designated places, unless include_statistical is true. Each row carries its website on file, the registered .gov domains linked to it (start there) and its agency count. Use this to answer 'what should I gather next?' for a state or overall. Skips jurisdictions with an active coverage gap (recorded as blocked, retry_after in the future) unless include_gaps is true; a gap stops counting once the jurisdiction has agencies.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":[],"properties":{"state":{"type":"string","description":"Two-letter state abbreviation to limit results (e.g. 'CA'). Omit for all states."},"level":{"type":"string","enum":["place","county","state_legislative_upper","state_legislative_lower","congressional_district","school_district_unified","special_district"],"description":"Jurisdiction level to filter by (optional). Defaults to place. special_district rows have no population: those with a Census website come first, then by name."},"coverage":{"type":"string","enum":["none","agencies","governed","served"],"description":"Coverage level to return (default none). none = no agencies; agencies = agencies but no council or board; governed = agencies and a body but no services; served = all three. A state's body is its legislature. Use agencies or governed to queue thin places for backfill."},"limit":{"default":5,"maximum":20,"type":"integer","description":"How many uncovered jurisdictions to return","minimum":1},"include_statistical":{"default":false,"type":"boolean","description":"Level place only: also return places without a government of their own (census-designated places, inactive places, and places with no FUNCSTAT stored)"},"include_gaps":{"default":false,"type":"boolean","description":"Also return jurisdictions with an active coverage gap (see record_coverage_gap)"}}}},{"name":"search_agencies","description":"Search for government agencies by name, description, or contact information. Can filter by agency type.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query to match against agency name, description, phone, or email"},"limit":{"default":10,"maximum":100,"type":"integer","description":"Maximum number of results to return","minimum":1},"jurisdiction_ids":{"type":"array","description":"Scope results to these jurisdiction IDs (from set_location)","items":{"type":"integer"}},"agency_type":{"type":"string","enum":["administration","animal_services","assessment","clerk","courts","economic_development","education","elections","emergency_management","environment","finance","fire","health","housing","human_resources","human_services","information_technology","legal","legislative","library","parks_recreation","planning","police","public_works","transportation","utilities","workforce"],"description":"Filter by agency type: what the agency does, not what kind of unit it is. administration (executive management: city/county manager, administrator, mayor's office); animal_services (animal control and shelters); assessment (property assessment and appraisal); clerk (city/county clerk, public records, recorder); courts (courts and court administration); economic_development (business attraction and retention); education (schools and education administration); elections (voter registration and elections); emergency_management (emergency preparedness, 911 dispatch); environment (environmental protection, sustainability); finance (finance, budget, treasury, tax collection); fire (fire and rescue, EMS); health (public health, behavioral health, hospitals); housing (housing authorities and housing programs); human_resources (personnel and employee relations); human_services (social services, benefits, aging, veterans); information_technology (IT and technology services); legal (city/county attorney, counsel, prosecution, public defense); legislative (legislatures and councils' own agencies); library (public libraries); parks_recreation (parks, recreation, open space); planning (planning, zoning, building and permits); police (police and sheriff law enforcement, corrections); public_works (streets, engineering, facilities, fleet); transportation (transit, airports, ports, traffic); utilities (water, sewer, power, solid waste); workforce (employment and job training)"}}}},{"name":"get_agency_details","description":"Get comprehensive details for a specific government agency by ID, including its services, bodies, staff positions (with each seat's current holder) and jurisdiction.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","description":"The unique identifier of the agency"}}}},{"name":"find_agencies_near_point","description":"Find all government agencies within a specified radius of geographic coordinates (latitude/longitude).","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number","description":"Latitude coordinate (e.g., 37.7749 for San Francisco)"},"longitude":{"type":"number","description":"Longitude coordinate (e.g., -122.4194 for San Francisco)"},"radius_meters":{"default":5000,"maximum":100000,"type":"integer","description":"Search radius in meters (default 5000m = 5km)","minimum":100}}}},{"name":"search_services","description":"Search for public services by name, description, eligibility requirements, or contact information. Can filter by service type.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query to match against service name, description, eligibility, or contact info"},"limit":{"default":10,"maximum":100,"type":"integer","description":"Maximum number of results to return","minimum":1},"jurisdiction_ids":{"type":"array","description":"Scope results to these jurisdiction IDs (from set_location)","items":{"type":"integer"}},"service_type":{"type":"string","enum":["health","education","housing","transportation","employment","business","public_safety","utilities","recreation","social_services"],"description":"Filter by service type (e.g., 'health', 'education', 'housing', 'transportation')"}}}},{"name":"get_service_details","description":"Get comprehensive details for a specific public service by ID, including agency and jurisdiction information.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","description":"The unique identifier of the service"}}}},{"name":"find_services_near_point","description":"Find all public services within a specified radius of geographic coordinates (latitude/longitude).","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number","description":"Latitude coordinate (e.g., 37.7749 for San Francisco)"},"longitude":{"type":"number","description":"Longitude coordinate (e.g., -122.4194 for San Francisco)"},"radius_meters":{"default":10000,"maximum":100000,"type":"integer","description":"Search radius in meters (default 10000m = 10km)","minimum":100}}}},{"name":"search_places","description":"Search public places (parks, libraries, schools) by name, description or city. Each result carries its website, address, coordinates, jurisdiction and managing agency. Search before create_entity(entity_type: place) to avoid duplicates.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query to match against place name, description or city"},"limit":{"default":10,"maximum":100,"type":"integer","description":"Maximum number of results to return","minimum":1},"jurisdiction_ids":{"type":"array","description":"Scope results to these jurisdiction IDs (from set_location)","items":{"type":"integer"}},"place_type":{"type":"string","enum":["library","park","school"],"description":"Filter by place type"}}}},{"name":"search_people","description":"Search for public officials and government employees by name, position, or contact information. Can filter by political affiliation.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query to match against first name, last name, position, or email"},"limit":{"default":10,"maximum":100,"type":"integer","description":"Maximum number of results to return","minimum":1},"jurisdiction_ids":{"type":"array","description":"Scope results to people holding a tenure in these jurisdiction IDs (from set_location)","items":{"type":"integer"}},"political_affiliation":{"type":"string","description":"Filter by political affiliation (e.g., 'Democratic', 'Republican', 'Independent')"}}}},{"name":"get_person_details","description":"Get comprehensive details for a specific public official by ID, including all positions held (current and historical tenures).","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","description":"The unique identifier of the person"}}}},{"name":"search_bodies","description":"Search for governing bodies (city councils, commissions, boards) by name or legislative type.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query to match against body name, source, or legislative type"},"limit":{"default":10,"maximum":100,"type":"integer","description":"Maximum number of results to return","minimum":1},"jurisdiction_ids":{"type":"array","description":"Scope results to these jurisdiction IDs (from set_location)","items":{"type":"integer"}},"legislative_type":{"type":"string","description":"Filter by legislative type (e.g., 'council', 'commission', 'board', 'committee')"}}}},{"name":"search_positions","description":"Search for positions (seats/roles) within governing bodies. Returns position label, role, and current holder if any.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Search query to match against position label or role (optional if body_id provided)"},"limit":{"default":20,"maximum":100,"type":"integer","description":"Maximum number of results to return","minimum":1},"body_id":{"type":"integer","description":"Filter positions to a specific governing body"}}}},{"name":"get_body_details","description":"Get comprehensive details for a specific governing body by ID, including jurisdiction and agency associations.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","required":["id"],"properties":{"id":{"type":"integer","description":"The unique identifier of the governing body"},"as_of":{"type":"string","description":"ISO-8601 date. Seat holders on that date instead of today. A holder with no published start date counts only from the date a source listed them (verified_on)."}}}}]}