Canparl Get Bill Text
canparl_get_bill_textRead one version of a House or Senate bill as plain text from its official XML: the introduction (recommendation, summary, preamble, enacting clause), headings, numbered body sections, and schedules. Omitted publicationId reads the last-listed version in canparl_get_bill publications; omitted session means the verified current official session. Text over 24000 bytes returns an outline of segment counts and the outermost headings, each with its body offset and count; re-call with one segment and follow pagination.nextOffset. Sections are never split. A version exported only as a PDF, as in many older sessions, has no text here.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"billCode": "<billCode>"
},
"name": "canparl_get_bill_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Whole records per page of segment headings, body, or schedules: default 50 headings or 5 sections or schedules, 1–100 per call; larger values up to 10000 return 100 with a notice. | |
| offset | No | Zero-based whole-record offset in segment headings, body, or schedules, default 0; a heading's offset is the body offset of its first section. | |
| segment | No | One segment: introduction, headings, body, schedules. Omit for the whole text, or its outline above the 24000-byte threshold. | |
| session | No | Parliamentary session; omitted means current. | |
| billCode | Yes | Bill code from canparl_search_bills, including a split-bill suffix letter such as C-15A; accepts bill s321, S321, S 321, or S-321. | |
| language | No | Text language: en (default) reads the English XML, fr the French. | en |
| publicationId | No | Publication ID from canparl_get_bill publications; omit for the last-listed (furthest-stage) version. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bill | No | Official bill summary, as canparl_search_bills returns it. | |
| body | No | Top-level body sections in document order. | |
| kind | No | Absent for the whole text; outline lists segments; segment returns one selection. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Limit clamp guidance when applicable. | |
| headings | No | Body headings of every level in document order; an outline lists only the outermost level. | |
| segments | No | Segment selectors with their record counts; outline only. | |
| schedules | No | Top-level schedules in document order. | |
| disclosure | No | Outline, empty-segment, or past-end guidance. | |
| pagination | No | Whole-record continuation of a headings, body, or schedules page. | |
| provenance | No | Original retrieval metadata for every source request. | |
| totalCount | No | Records in the selected headings, body, or schedules segment; paged segments only. | |
| publication | No | The version read: its dossier publication record and the identity its XML prints. | |
| introduction | No | Text before the body as plain text; the table of provisions is left to the outline and headings. | |
| appliedFilters | No | Normalized requested bill version. |