Skip to main content
Glama

List Legislation

list_legislation
Read-only

Retrieve a list of statutes or regulations from a specified Canadian legislation database by providing the database ID (e.g., 'ons' for Ontario statutes).

Instructions

List statutes or regulations from a specific legislation database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseIdYesLegislation database ID from list_legislation_databases (e.g. "ons" for Ontario statutes)
languageNoResponse languageen

Implementation Reference

  • The handler function for the 'list_legislation' tool. It calls the CanLII API endpoint `/legislationBrowse/${language}/${databaseId}/` and returns the result.
    async ({ language, databaseId }) => {
    	try {
    		return ok(await request(`/legislationBrowse/${language}/${databaseId}/`));
    	} catch (e) {
    		return err(String(e));
    	}
    },
  • The input schema for 'list_legislation': requires a databaseId string and optional language (en/fr, default en).
    description: "List statutes or regulations from a specific legislation database.",
    inputSchema: {
    	databaseId: z
    		.string()
    		.describe(
    			'Legislation database ID from list_legislation_databases (e.g. "ons" for Ontario statutes)',
    		),
    	language: z.enum(["en", "fr"]).default("en").describe("Response language"),
    },
    title: "List Legislation",
  • src/server.ts:258-280 (registration)
    Registration of the 'list_legislation' tool via server.registerTool() with its schema and handler.
    server.registerTool(
    	"list_legislation",
    	{
    		annotations: { readOnlyHint: true },
    		description: "List statutes or regulations from a specific legislation database.",
    		inputSchema: {
    			databaseId: z
    				.string()
    				.describe(
    					'Legislation database ID from list_legislation_databases (e.g. "ons" for Ontario statutes)',
    				),
    			language: z.enum(["en", "fr"]).default("en").describe("Response language"),
    		},
    		title: "List Legislation",
    	},
    	async ({ language, databaseId }) => {
    		try {
    			return ok(await request(`/legislationBrowse/${language}/${databaseId}/`));
    		} catch (e) {
    			return err(String(e));
    		}
    	},
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true, confirming read-only nature. The description adds no extra behavioral context, such as pagination or sorting, but does not contradict annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence efficiently conveys the core purpose. However, it could include brief usage guidance without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity (2 params, no output schema), the description is minimally adequate but lacks details on return format or content of the list, requiring the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with both parameters described in the schema. The description adds no additional meaning beyond what is in the schema, so baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it lists statutes or regulations from a specific database, using a specific verb and resource. It distinguishes from sibling tools like get_legislation (single item) and list_legislation_databases (databases list).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when listing from a specific database, but does not explicitly provide when to use or not, nor references alternative sibling tools. Context is inferred from names but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vaquill-AI/canlii-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server