Skip to main content
Glama

get_case_citator_tease

Preview up to 5 citation relationships for a case to quickly determine if it has been cited. Faster than a full citator, ideal for initial checks before requesting complete citation data.

Instructions

Quick preview of citation relationships (max 5 results). Faster than the full citator. Use this for a quick check on whether a case has been cited, then use get_case_citator for the complete list if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage: 'en' for English (default), 'fr' for Frenchen
databaseIdYesCourt database ID (e.g., 'onsc', 'onca', 'csc-scc')
caseIdYesCase unique identifier (e.g., '2021onsc8582')
metadataTypeYesType of citation data to preview

Implementation Reference

  • Handler function for the get_case_citator_tease tool. Calls the CanLII API v1/caseCitatorTease endpoint, parses response based on metadataType using the appropriate schema, and returns JSON. Supports citedCases, citingCases, and citedLegislations metadata types.
    async ({ language, databaseId, caseId, metadataType }) => {
    	try {
    		const params = new URLSearchParams({ api_key: apiKey });
    
    		const response = await apiFetch(
    			`https://api.canlii.org/v1/caseCitatorTease/${language}/${encodeURIComponent(databaseId)}/${encodeURIComponent(caseId)}/${metadataType}?${params.toString()}`
    		);
    
    		if (!response.ok) {
    			return errorResponse(`Error: Failed to fetch citator tease data (${response.status})`);
    		}
    
    		const data = await response.json();
    
    		const schemaMap = {
    			citedCases: CitedCasesResponseSchema,
    			citingCases: CitingCasesResponseSchema,
    			citedLegislations: CitedLegislationsResponseSchema,
    		} as const;
    
    		const parsed = schemaMap[metadataType].parse(data);
    		return jsonResponse(parsed);
    	} catch (error) {
    		return errorResponse(
    			`Error: ${error instanceof Error ? error.message : "Unknown error"}`
    		);
    	}
    }
  • src/index.ts:352-394 (registration)
    Registration of the get_case_citator_tease tool via server.tool(). Defines input schema (language, databaseId, caseId, metadataType) and description explaining it's a quick preview (max 5 results) faster than the full citator.
    server.tool(
    	"get_case_citator_tease",
    	"Quick preview of citation relationships (max 5 results). Faster than the full citator. " +
    	"Use this for a quick check on whether a case has been cited, then use get_case_citator for the complete list if needed.",
    	{
    		language: z.enum(["en", "fr"]).default("en")
    			.describe("Language: 'en' for English (default), 'fr' for French"),
    		databaseId: pathSegmentSchema
    			.describe("Court database ID (e.g., 'onsc', 'onca', 'csc-scc')"),
    		caseId: pathSegmentSchema
    			.describe("Case unique identifier (e.g., '2021onsc8582')"),
    		metadataType: z.enum(["citedCases", "citingCases", "citedLegislations"])
    			.describe("Type of citation data to preview"),
    	},
    	async ({ language, databaseId, caseId, metadataType }) => {
    		try {
    			const params = new URLSearchParams({ api_key: apiKey });
    
    			const response = await apiFetch(
    				`https://api.canlii.org/v1/caseCitatorTease/${language}/${encodeURIComponent(databaseId)}/${encodeURIComponent(caseId)}/${metadataType}?${params.toString()}`
    			);
    
    			if (!response.ok) {
    				return errorResponse(`Error: Failed to fetch citator tease data (${response.status})`);
    			}
    
    			const data = await response.json();
    
    			const schemaMap = {
    				citedCases: CitedCasesResponseSchema,
    				citingCases: CitingCasesResponseSchema,
    				citedLegislations: CitedLegislationsResponseSchema,
    			} as const;
    
    			const parsed = schemaMap[metadataType].parse(data);
    			return jsonResponse(parsed);
    		} catch (error) {
    			return errorResponse(
    				`Error: ${error instanceof Error ? error.message : "Unknown error"}`
    			);
    		}
    	}
    );
  • CitedCasesResponseSchema — validates responses with a 'citedCases' array of CaseSchema objects. Used by the handler when metadataType is 'citedCases'.
    export const CitedCasesResponseSchema = z.object({
        citedCases: z.array(CaseSchema),
    }).passthrough();
  • CitingCasesResponseSchema — validates responses with a 'citingCases' array of CaseSchema objects. Used by the handler when metadataType is 'citingCases'.
    export const CitingCasesResponseSchema = z.object({
        citingCases: z.array(CaseSchema),
    }).passthrough();
  • CitedLegislationsResponseSchema — validates responses with a 'citedLegislations' array of LegislationItemSchema objects. Used by the handler when metadataType is 'citedLegislations'.
    export const CitedLegislationsResponseSchema = z.object({
        citedLegislations: z.array(LegislationItemSchema),
    }).passthrough();
Behavior4/5

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

Discloses the key behavioral trait of returning at most 5 results and being faster than the full citator. However, with no annotations provided, it does not cover other traits like authentication requirements or error handling, which would be valuable for a write operation but this is a read-only preview.

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

Conciseness5/5

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

Extremely concise with two sentences that convey purpose, limits, speed advantage, and recommended workflow. No redundant information.

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?

The description explains the tool's role and limits but does not describe the output format or behavior beyond the preview, leaving some ambiguity for an agent. However, given the simplicity of the tool and the absence of an output schema, it is minimally adequate.

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 description coverage is 100%, with each parameter already well-described in the schema. The description adds no further parameter-level detail beyond the tool's overall purpose, so it aligns with the baseline score.

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?

Clearly states the tool provides a quick preview of citation relationships with a maximum of 5 results, distinguishing it from the sibling 'get_case_citator' which offers the complete list.

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

Usage Guidelines5/5

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

Explicitly tells when to use this tool ('quick check') and advises to use the full citator for a complete list if needed, providing clear usage context and alternatives.

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/mohammadfarooqi/canlii-mcp'

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