{
  "serverInfo": {
    "name": "akashic-elections",
    "title": "Akashic Elections (2020–2026)",
    "version": "1.3.0",
    "websiteUrl": "https://akashic.app",
    "icons": [
      {
        "src": "https://akashic.app/brand/logo-mark-144.png",
        "mimeType": "image/png",
        "sizes": [
          "144x144"
        ]
      },
      {
        "src": "https://akashic.app/brand/logo-512.png",
        "mimeType": "image/png",
        "sizes": [
          "512x512"
        ]
      }
    ]
  },
  "authentication": {
    "required": false,
    "schemes": [
      "noauth"
    ]
  },
  "tools": [
    {
      "name": "akashic_election_overview",
      "title": "Election Overview (2020–2026)",
      "description": "Get U.S. Presidential, House, Senate, or Governor election results, Electoral College or chamber control, national popular vote shares, boundary vintage, and special elections for any year from 2020 to 2026.S. election statistics.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 2020,
            "maximum": 2026,
            "description": "Election year (2020–2026)."
          },
          "office": {
            "type": "string",
            "enum": [
              "president",
              "house",
              "senate",
              "governor"
            ],
            "description": "Office tab: president (2020/2024), house (2020/2022/2024/2026 + specials), senate (2020/2022/2024/2026 + specials), or governor (2020–2026)."
          },
          "stage_filter": {
            "type": "string",
            "enum": [
              "all",
              "general_and_concurrent",
              "specials_only"
            ],
            "description": "Filter regular vs special/runoff elections: all, general_and_concurrent, or specials_only."
          },
          "contest_filter": {
            "type": "string",
            "enum": [
              "all",
              "flipped_only",
              "close_only",
              "competitive_10pp"
            ],
            "description": "Optional contest subset: all, flipped_only, close_only (<=5pp), or competitive_10pp (<=10pp)."
          },
          "state": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "description": "Optional two-letter state abbreviation filter (e.g. TX, FL, PA)."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "description": "Maximum number of contests to return in featuredContests (default 15, max 500 for full-chamber Python tables)."
          },
          "image_format": {
            "type": "string",
            "enum": [
              "post",
              "square",
              "story",
              "landscape"
            ],
            "description": "Optional share image format (post, square, story, landscape) to include a rendered PNG."
          }
        },
        "required": [
          "year",
          "office"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "overview"
          }
        }
      },
      "annotations": {
        "title": "Election Overview (2020–2026)",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "akashic_race_results",
      "title": "Race & Special Election Results",
      "description": "Look up detailed candidate vote totals, margins, fusion ballot lines, presidential baselines, and county splits for any specific 2020–2026 race, special election, runoff, or recall (e.g. 'FL Senate Special', 'TX-09', '2021 CA Recall', 'PA-07').S. election results.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "Place or contest query such as 'TX-09', 'Florida Senate Special', 'Autauga County, AL', '2025 VA Governor', or 'AK-AL'."
          },
          "year": {
            "type": "integer",
            "minimum": 2020,
            "maximum": 2026,
            "description": "Optional year override (2020–2026)."
          },
          "office": {
            "type": "string",
            "enum": [
              "president",
              "house",
              "senate",
              "governor"
            ],
            "description": "Optional office filter (president, house, senate, governor)."
          },
          "include_specials": {
            "type": "boolean",
            "description": "Whether to include special elections and runoffs when resolving a place."
          },
          "county_limit": {
            "type": "integer",
            "minimum": 5,
            "maximum": 300,
            "description": "Maximum number of county rows to return in topCounties (default 12, max 300 for full-state county tables)."
          },
          "image_format": {
            "type": "string",
            "enum": [
              "post",
              "square",
              "story",
              "landscape"
            ],
            "description": "Optional share image format (post, square, story, landscape) to attach a rendered PNG."
          }
        },
        "required": [
          "query"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "race"
          }
        }
      },
      "annotations": {
        "title": "Race & Special Election Results",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "akashic_precinct_breakdown",
      "title": "County & Precinct Breakdown",
      "description": "Inspect precinct-level election results inside U.S. counties nationwide (~3,143 counties, e.g. 'Autauga County, AL', 'Miami-Dade, FL', '12086', 'Maricopa County, AZ', 'Cook County, IL', 'Fulton County, GA', or by district state such as 'FL-27').",
      "inputSchema": {
        "type": "object",
        "properties": {
          "county_or_district": {
            "type": "string",
            "minLength": 2,
            "maxLength": 120,
            "description": "County name/FIPS (e.g. '12086', 'Miami-Dade, FL', 'Liberty County, TX') or district (e.g. 'FL-27', 'TX-09')."
          },
          "year": {
            "type": "integer",
            "minimum": 2020,
            "maximum": 2026,
            "description": "Election year (2020–2026)."
          },
          "office": {
            "type": "string",
            "enum": [
              "president",
              "house",
              "senate",
              "governor"
            ],
            "description": "Office (president, house, senate, governor)."
          },
          "limit": {
            "type": "integer",
            "minimum": 5,
            "maximum": 500,
            "description": "Maximum number of precinct rows to return (default 25, max 500 for Python field-turf tables)."
          },
          "sort_by": {
            "type": "string",
            "enum": [
              "votes_desc",
              "closest_margin",
              "dem_margin",
              "rep_margin"
            ],
            "description": "Sort order for returned precincts: votes_desc (default), closest_margin, dem_margin, or rep_margin."
          },
          "image_format": {
            "type": "string",
            "enum": [
              "post",
              "square",
              "story",
              "landscape"
            ],
            "description": "Optional share image format (post, square, story, landscape) to attach a rendered PNG."
          }
        },
        "required": [
          "county_or_district"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "precinct"
          }
        }
      },
      "annotations": {
        "title": "County & Precinct Breakdown",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "akashic_compare_geography",
      "title": "Compare Geography (2020–2026 History)",
      "description": "Compare results in the same state, county, congressional district, or nationwide across 2020–2026 and across President, House, Senate, Governor, and special elections, with automatic redistricting boundary-change detection.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "geography": {
            "type": "string",
            "minLength": 2,
            "maxLength": 120,
            "description": "Geography to track across 2020–2026: state ('FL'), county ('Miami-Dade, FL' or '12086'), congressional district ('TX-09', 'PA-07'), or nation ('US')."
          },
          "offices": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "president",
                "house",
                "senate",
                "governor"
              ]
            },
            "description": "Optional subset of offices to include (president, house, senate, governor)."
          },
          "include_specials": {
            "type": "boolean",
            "description": "Include special elections and runoffs in the chronology (default true)."
          },
          "image_format": {
            "type": "string",
            "enum": [
              "post",
              "square",
              "story",
              "landscape"
            ],
            "description": "Optional share image format (post, square, story, landscape) to render a trajectory share card."
          }
        },
        "required": [
          "geography"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "compare_geography"
          }
        }
      },
      "annotations": {
        "title": "Compare Geography (2020–2026 History)",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "akashic_compare_elections",
      "title": "Compare Two Elections (Swing & Flips)",
      "description": "Compute unit-by-unit D–R swings, party flips, and turnout changes between any two elections (2020–2026) at state, county, or congressional district scale, guarding against redistricted House lines.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "year_a": {
            "type": "integer",
            "minimum": 2020,
            "maximum": 2026,
            "description": "Later / primary comparison year (2020–2026)."
          },
          "office_a": {
            "type": "string",
            "enum": [
              "president",
              "house",
              "senate",
              "governor"
            ],
            "description": "Primary comparison office (president, house, senate, governor)."
          },
          "year_b": {
            "type": "integer",
            "minimum": 2020,
            "maximum": 2026,
            "description": "Baseline / earlier comparison year (2020–2026)."
          },
          "office_b": {
            "type": "string",
            "enum": [
              "president",
              "house",
              "senate",
              "governor"
            ],
            "description": "Baseline office (president, house, senate, governor)."
          },
          "sub_geo_level": {
            "type": "string",
            "enum": [
              "state",
              "county",
              "cd"
            ],
            "description": "Geography unit for swing comparison: state, county, or cd."
          },
          "state": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "description": "Optional state filter (recommended when comparing counties in a single state)."
          },
          "exclude_redistricted": {
            "type": "boolean",
            "description": "If true, exclude congressional districts whose lines changed between cycles for a pure untouched-footprint swing."
          },
          "unit_filter": {
            "type": "string",
            "enum": [
              "all",
              "flipped_only",
              "close_only",
              "dem_swing",
              "rep_swing",
              "redistricted_only"
            ],
            "description": "Optional unit subset: all, flipped_only, close_only (<=5pp), dem_swing, rep_swing, or redistricted_only."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 3200,
            "description": "Maximum number of unit rows to return in topMovers (default 15, max 3200 for full CD or national county Python joins)."
          },
          "image_format": {
            "type": "string",
            "enum": [
              "post",
              "square",
              "story",
              "landscape"
            ],
            "description": "Optional share image format (post, square, story, landscape) to render a swing share card."
          }
        },
        "required": [
          "year_a",
          "office_a",
          "year_b",
          "office_b"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "compare_elections"
          }
        }
      },
      "annotations": {
        "title": "Compare Two Elections (Swing & Flips)",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "akashic_render_share_card",
      "title": "Generate Custom Election Share Image",
      "description": "Render a publication-grade PNG election share card with choropleth map, KPIs, and vote breakdowns for any 2020–2026 chamber overview, single race, county precinct map, swing comparison, or geography trajectory. Supports post (1080x1350), square (1080x1080), story (1080x1920), and landscape (1200x630) in dark or light theme.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "card_type": {
            "type": "string",
            "enum": [
              "race",
              "chamber",
              "precinct",
              "comparison",
              "trajectory",
              "edge"
            ],
            "description": "Layout type: race, chamber, precinct, comparison, trajectory, or edge (2026 Candidate Edge+)."
          },
          "format": {
            "type": "string",
            "enum": [
              "post",
              "square",
              "story",
              "landscape"
            ],
            "description": "PNG size: post (1080x1350), square (1080x1080), story (1080x1920), or landscape (1200x630)."
          },
          "theme": {
            "type": "string",
            "enum": [
              "dark",
              "light"
            ],
            "description": "Color theme: dark (obsidian) or light (parchment)."
          },
          "year": {
            "type": "integer",
            "minimum": 2020,
            "maximum": 2026,
            "description": "Election year (2020–2026)."
          },
          "office": {
            "type": "string",
            "enum": [
              "president",
              "house",
              "senate",
              "governor"
            ],
            "description": "Office (president, house, senate, governor)."
          },
          "query": {
            "type": "string",
            "maxLength": 120,
            "description": "Place or contest query (e.g. 'FL Senate Special', 'PA-07', 'US')."
          },
          "compare_year": {
            "type": "integer",
            "minimum": 2020,
            "maximum": 2026,
            "description": "Optional second year for comparison card_type."
          },
          "compare_office": {
            "type": "string",
            "enum": [
              "president",
              "house",
              "senate",
              "governor"
            ],
            "description": "Optional second office for comparison card_type."
          },
          "sub_geo_level": {
            "type": "string",
            "enum": [
              "state",
              "county",
              "cd"
            ],
            "description": "Optional sub-geography level for comparison card_type (state, county, cd)."
          },
          "headline_override": {
            "type": "string",
            "maxLength": 110,
            "description": "Optional concise custom headline override."
          },
          "subtitle_override": {
            "type": "string",
            "maxLength": 140,
            "description": "Optional concise custom subtitle override."
          },
          "create_public_link": {
            "type": "boolean",
            "description": "If true, mint a signed /s/<token> public preview link alongside the PNG."
          }
        },
        "required": [
          "card_type",
          "year"
        ],
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "share_card"
          }
        }
      },
      "annotations": {
        "title": "Generate Custom Election Share Image",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "akashic_canvass_ledger",
      "title": "Canvass & Certification Hurdle Ledger",
      "description": "Inspect uncalled races, remaining-ballot overtake hurdles, ranked-choice 50%+1 thresholds, Louisiana December runoff cushions, recount-zone contests, and 50-state official vs unofficial canvass status (defaulting to 2026).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "minimum": 2020,
            "maximum": 2026,
            "description": "Election year to inspect (defaults to 2026)."
          },
          "office": {
            "type": "string",
            "enum": [
              "president",
              "house",
              "senate",
              "governor"
            ],
            "description": "Optional office filter: house, senate, governor, or president."
          },
          "state": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "description": "Optional two-letter state code filter (e.g. AK, NC, LA, MN, TN)."
          },
          "mode": {
            "type": "string",
            "enum": [
              "uncalled_only",
              "uncalled_and_recount",
              "all_close_2pp"
            ],
            "description": "Contest filter: uncalled_only, uncalled_and_recount (default, includes called <=0.50pp), or all_close_2pp."
          }
        },
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "canvass_ledger"
          }
        }
      },
      "annotations": {
        "title": "Canvass & Certification Hurdle Ledger",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "akashic_project_polygon",
      "title": "Project Custom Polygon or Site Radius (2020–2026)",
      "description": "Project any custom WGS84 GeoJSON polygon, geodesic site radius (lat/lon + radius_km), or basket of County FIPS / Congressional Districts onto 2020–2026 Presidential, Senate, Governor, and 2026 House election baselines using Albers equal-area spatial weights, returning reconstructed valid-vote margins, midterm turnout retention, and intersecting CD120 districts.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 120,
            "description": "Optional human-readable name for the custom site, corridor, DMA, or proposed district."
          },
          "lat": {
            "type": "number",
            "minimum": 18,
            "maximum": 72,
            "description": "Center WGS84 latitude (18 to 72) when projecting a geodesic site radius."
          },
          "lon": {
            "type": "number",
            "minimum": -179,
            "maximum": -65,
            "description": "Center WGS84 longitude (-179 to -65) when projecting a geodesic site radius."
          },
          "radius_km": {
            "type": "number",
            "minimum": 1,
            "maximum": 800,
            "description": "Geodesic buffer radius in kilometers around (lat, lon), default 35 km."
          },
          "geojson": {
            "type": "string",
            "maxLength": 40000,
            "description": "Serialized WGS84 GeoJSON Polygon, MultiPolygon, Feature, or FeatureCollection string."
          },
          "unit_ids": {
            "maxItems": 250,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 12
            },
            "description": "Optional list of 5-digit county FIPS codes or Congressional District IDs (e.g. ['04013', '04021'] or ['TX-07', 'TX-09'])."
          }
        },
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "polygon_projection"
          }
        }
      },
      "annotations": {
        "title": "Project Custom Polygon or Site Radius (2020–2026)",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "akashic_candidate_edge",
      "title": "2026 Candidate Edge+ & CD120 Fundamentals",
      "description": "Inspect or rank 2026 U.S. House Candidate Edge+ scores (par = 100) across all 435 CD120 districts. Decomposes performance into Margin Edge (WAR × stakes_weight), Turnout Edge (CVAP turnout α × 0.25), and Clutch Edge (WPA × 4.0) alongside 2000–2024 reaggregated CD120 presidential baselines, 2024 CVAP demographics, and 2026 FEC net disbursements. Pass 'district' (e.g. 'NC-11', 'CO-04', 'Jamie Ager') for a full 7-cycle district profile, or omit 'district' to query leaderboards/cohorts (up to limit=435 for Python regressions).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "district": {
            "type": "string",
            "minLength": 2,
            "maxLength": 80,
            "description": "Optional 2026 CD120 House district code or candidate name (e.g. 'NC-11', 'CO-04', 'Jamie Ager') for a full 2000–2024 + CVAP + FEC district deep-dive."
          },
          "party": {
            "type": "string",
            "enum": [
              "ALL",
              "DEM",
              "REP"
            ],
            "description": "Optional winner party filter for leaderboard mode: ALL, DEM, or REP."
          },
          "archetype": {
            "type": "string",
            "enum": [
              "ALL",
              "Wave-Maker Upset",
              "Wave-Stopper Hold",
              "Toss-Up Closer",
              "Crossover Winner",
              "Dominant Overperformer",
              "Turnout Mobilizer",
              "On-Par Hold",
              "Ticket Drag"
            ],
            "description": "Optional archetype filter: Wave-Maker Upset, Wave-Stopper Hold, Toss-Up Closer, Crossover Winner, Dominant Overperformer, Turnout Mobilizer, On-Par Hold, or Ticket Drag."
          },
          "state": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "description": "Optional two-letter state code filter (e.g. NC, FL, CO, OH)."
          },
          "seat_filter": {
            "type": "string",
            "enum": [
              "all",
              "open_only",
              "redistricted_only",
              "outspent_winners",
              "crossover_pres24"
            ],
            "description": "Optional structural cohort: all, open_only, redistricted_only, outspent_winners, or crossover_pres24."
          },
          "include_provisional": {
            "type": "boolean",
            "description": "If true, include incomplete-count (analysis_ready=false) and Louisiana December runoff districts (default false)."
          },
          "include_unscored": {
            "type": "boolean",
            "description": "If true, include the 20 unscored RCV, top-two same-party, or uncontested seats (default false)."
          },
          "sort_by": {
            "type": "string",
            "enum": [
              "edge_plus",
              "edge_pts",
              "margin_edge",
              "turnout_edge",
              "clutch_edge",
              "raw_war_pp",
              "edge_grade",
              "turnout_2026",
              "shift_24yr",
              "winner_disb",
              "spend_efficiency",
              "district"
            ],
            "description": "Sort field: edge_plus (default), edge_pts, margin_edge, turnout_edge, clutch_edge, raw_war_pp, edge_grade, turnout_2026, shift_24yr, winner_disb, spend_efficiency, or district."
          },
          "sort_dir": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ],
            "description": "Sort direction: desc or asc."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 435,
            "description": "Maximum number of district rows to return in leaderboard mode (default 25, max 435 for full-chamber Python regressions)."
          },
          "image_format": {
            "type": "string",
            "enum": [
              "post",
              "square",
              "story",
              "landscape"
            ],
            "description": "Optional share image format (post, square, story, landscape) to render a Candidate Edge+ PNG card."
          }
        },
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "kind": {
            "const": "candidate_edge"
          }
        }
      },
      "annotations": {
        "title": "2026 Candidate Edge+ & CD120 Fundamentals",
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    }
  ],
  "resources": [],
  "prompts": []
}