@pipeworx/american-samoa-code

Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/american-samoa-code’s. Install: one-click buttons

Connect to just the @pipeworx/american-samoa-code pack

https://gateway.pipeworx.io/american-samoa-code/mcp — only @pipeworx/american-samoa-code’s own tools, nothing else in the catalog.

No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.

Tools: 3

American Samoa Code Annotated (A.S.C.A.) — section lookup by citation and topic/keyword search. Keyless.

Tools

  • as_statute(citation) — full text of an A.S.C.A. section by citation (“46.3502” is Murder in the 1st Degree; “1.0201” is laws applicable in American Samoa). Returns the statute text, its chapter, the “History:” amendment line, and any “Case Notes:” (case-law annotations) asbar.org publishes for that section.
  • as_search(query, limit?) — topic/keyword search via asbar.org’s own site search, filtered to Code Annotated section results, returning matching citations, headings, and URLs.
  • as_titles() — all 38 published titles of the Code with their official names, for routing a subject to the right title number.

Auth

Keyless.

Covering the DC + territories gap

Bruce asked 2026-10-09 to cover DC and the five inhabited US territories after the 50-state code effort (#2881, #2883-#2885): none of DC, Puerto Rico, Guam, the US Virgin Islands, American Samoa, or the Northern Mariana Islands had a code pack (dc-dmv is motor-vehicle records only). American Samoa is the first of the six to ship.

Source and the one-hop shape

The American Samoa Bar Association (asbar.org) publishes the full Code Annotated as one WordPress post per section, keyless, no signup — confirmed live against every tool above. Unlike Oklahoma’s OSCN or North Dakota’s ndlegis.gov, there is no per-title index page to resolve a citation against; instead every section is reachable directly at /code-annotated/TITLE-SECTION-slug/, and the complete citation -> URL map comes from asbar.org’s own Yoast SEO XML sitemaps for the code_annotated post type — confirmed the only route, since that post type has no REST route (/wp-json/wp/v2/code_annotated 404s live). as_statute therefore needs only ONE live fetch per call (the section page itself); the citation -> URL resolution is a baked lookup, not a second hop.

Baked index

src/as-index-data.ts bakes the citation -> URL map (and the 38 official title names, from asbar.org’s “Code Annotated by Title and Chapter” page) from the four code_annotated-sitemap{,2,3,4}.xml shards — 3,597 URLs, 3,572 citations after resolving a handful of collisions (see below). It goes through KV, not the gateway bundle (workers/gateway/src/pack-baked-indexes.json, fleet #2754) — the gateway injects it as args._bakedIndex on the first call into this pack.

Refresh path. Re-run whenever the Fono amends the Code and asbar.org adds sections (their schedule, not ours):

node mcps/american-samoa-code/scripts/bake-index.mjs > mcps/american-samoa-code/src/as-index-data.ts

It fails loudly if either sitemap count or the title count drops well below what asbar.org serves today — both would mean the site’s layout changed under it.

Two collision shapes found live (not a parsing bug — asbar.org’s own data)

Six of the 3,578 valid section URLs collide on citation. Every collision was confirmed by fetching both pages’ own headings:

  1. WordPress re-publish duplicates (2 of 6): the identical page published twice, the second time at WordPress’s own -2 slug-collision suffix (e.g. 6-0210-entitlement-to-vote and 6-0210-entitlement-to-vote-2, byte-identical statutory text). The generator collapses these to the canonical (non-suffixed) URL.
  2. Genuine citation collisions (4 of 6): two DIFFERENT sections — e.g. “4.1402 Definitions.” and “4.1402 Individualized service plan–Case management.” — both published under citation 4.1402. as_statute returns BOTH as candidates with ambiguous: true rather than silently picking one.

One irregular slug

1.0101 (“Citation.”) is published at /code-annotated/10101-citation/ — no hyphen between title and section, unlike every other URL. Hardcoded as a single override in the generator.

Sub-numbered sections

20 of the 3,597 slugs carry a third numeric segment, e.g. /code-annotated/4-1307-1-limitation-of-liability/, which is the literal citation 4.1307.1 (confirmed live by its own page heading), not part of the slug’s descriptive tail. as_statute accepts citations with this third segment.

A known upstream content error, left as-is

At least one section’s heading and body do not match: the page titled “4.1307.1 Limitation of liability.” (confirmed live) actually serves the same body text as a different section about departmental agreements. This is asbar.org’s own publication, not a parse error on our side — as_statute returns exactly what the source serves, with the section’s own URL, so a caller can verify.

Edge probe

Confirmed live from a throwaway pw-yeva-edgeprobe-americansamoacode wrangler dev --remote Worker on the prod account (2026-10-09), for all three URL shapes this pack uses — no Cloudflare Turnstile or other challenge from a Worker’s egress against asbar.org, unlike oscn.net (mcps/oklahoma-code):

URL shapeStatusLengthFirst bytes
/code-annotated/46-3502-murder-in-the-1st-degree/20063,080 Breal HTML doctype + UTF-8 charset meta tag, matching the laptop’s own curl
/search/domestic%20violence/feed/rss2/200205,246 Breal RSS 2.0 XML prolog, channel/title elements present
/code_annotated-sitemap.xml200148,922 Breal sitemap XML prolog, urlset element present

All three server: cloudflare, content-type matching the real resource (HTML / RSS+XML / XML) — byte-identical in shape to the laptop’s own curl, confirming asbar.org does not single out Worker egress the way oscn.net does.

Data sources

  • https://asbar.org/code_annotated-sitemap{,2,3,4}.xml — the complete list of section URLs (baked once, not fetched per call).
  • https://asbar.org/legal-resources/code-annotated/code-annotated-by-title-and-chapter/ — the 38 official title names (baked once).
  • https://asbar.org/code-annotated/TITLE-SECTION-slug/ — one section’s full text, chapter, history, and case notes. as_statute.
  • https://asbar.org/search/<query>/feed/rss2/?paged=N — the Bar Association’s own site search, as RSS (paginated, 10 results/page). as_search.

All keyless, server-rendered HTML/XML — no login, no JS, no rate limit observed during development.

Tools

  • as_statute — Get the FULL TEXT of a section of the American Samoa Code Annotated (A.S.C.A.) by citation, e.g. “46.3502” (Murder in the 1st degree) or “1.0201” (laws applicable in American Samoa). Accepts “46.3502”
  • as_search — Search the American Samoa Code Annotated by TOPIC or keyword rather than citation, e.g. “domestic violence”, “limitation of liability”, “entitlement to vote”. Returns matching citations, headings, and
  • as_titles — List all 38 published titles of the American Samoa Code Annotated with their official names, e.g. Title 46 is Criminal Justice, Title 42 is Domestic Relations. Routing help for when you know the subje

Tools

  • as_search — Search the American Samoa Code Annotated by TOPIC or keyword rather than citation, e.g. domestic violence , limitation of liability , entitlement to vote . Returns matching citations, headings, and th
  • as_statute — Get the FULL TEXT of a section of the American Samoa Code Annotated (A.S.C.A.) by citation, e.g. 46.3502 (Murder in the 1st degree) or 1.0201 (laws applicable in American Samoa). Accepts 46.3502 , A.S
  • as_titles — List all 38 published titles of the American Samoa Code Annotated with their official names, e.g. Title 46 is Criminal Justice, Title 42 is Domestic Relations. Routing help for when you know the subje

Regenerated from source · build October 9, 2026