/**
* Claude Tool Definitions
*
* Defines tools that Claude can call to query the Neo4j database
*/
import type Anthropic from '@anthropic-ai/sdk';
export const tools: Anthropic.Tool[] = [
// ============================================
// MP Tools
// ============================================
{
name: 'search_mps',
description: 'Search for Members of Parliament by name, party, or riding. Returns basic information about MPs including their party affiliation, riding, and cabinet positions.',
input_schema: {
type: 'object',
properties: {
searchTerm: {
type: 'string',
description: 'Search term to match against MP name or riding (optional)',
},
party: {
type: 'string',
description: 'Filter by party name (e.g., "Liberal", "Conservative", "NDP", "Bloc Québécois", "Green")',
},
current: {
type: 'boolean',
description: 'Only return currently serving MPs (default: true)',
},
cabinetOnly: {
type: 'boolean',
description: 'Only return cabinet ministers (default: false)',
},
limit: {
type: 'integer',
description: 'Maximum number of results to return (default: 10)',
},
},
},
},
{
name: 'get_mp',
description: 'Get detailed information about a specific MP including their biography, contact information, sponsored bills, expenses, and committee memberships. Use this after finding an MP with search_mps.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID (e.g., "pierre-poilievre", "chrystia-freeland")',
},
},
required: ['mpId'],
},
},
{
name: 'get_mp_scorecard',
description: 'Get a comprehensive performance scorecard for an MP including bills sponsored, votes cast, speeches made, committee participation, expenses, and lobbying interactions. Useful for evaluating MP activity and effectiveness.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID (e.g., "pierre-poilievre")',
},
},
required: ['mpId'],
},
},
{
name: 'get_mp_speeches',
description: 'Get recent speeches and statements made by an MP in the House of Commons. Returns Hansard excerpts with timestamps and context.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID',
},
limit: {
type: 'integer',
description: 'Maximum number of speeches to return (default: 20)',
},
},
required: ['mpId'],
},
},
// ============================================
// Bill Tools
// ============================================
{
name: 'search_bills',
description: 'Search for bills by number (e.g., "C-47") or keywords in the title/summary. Returns bill details including status, sponsors, and legislative progress.',
input_schema: {
type: 'object',
properties: {
searchTerm: {
type: 'string',
description: 'Bill number (e.g., "C-47") or keywords to search in title and summary',
},
session: {
type: 'string',
description: 'Parliamentary session (e.g., "44-1" for 44th Parliament, 1st Session)',
},
status: {
type: 'string',
description: 'Filter by bill status (e.g., "Royal Assent", "First Reading", "Committee")',
},
billType: {
type: 'string',
description: 'Filter by bill type (e.g., "Government Bill", "Private Member\'s Bill")',
},
limit: {
type: 'integer',
description: 'Maximum number of results (default: 20)',
},
},
},
},
{
name: 'get_bill',
description: 'Get detailed information about a specific bill including full text, sponsors, votes, legislative history, and current status. If session is omitted, returns the LATEST version of the bill (most recent parliament).',
input_schema: {
type: 'object',
properties: {
billNumber: {
type: 'string',
description: 'Bill number (e.g., "C-47", "S-12")',
},
session: {
type: 'string',
description: 'Parliamentary session (e.g., "44-1"). OPTIONAL - if omitted, returns the latest version of this bill.',
},
},
required: ['billNumber'],
},
},
{
name: 'get_bill_lobbying',
description: 'Get lobbying activity related to a specific bill. Shows which organizations and lobbyists have registered communications about this bill, revealing corporate and special interest influence.',
input_schema: {
type: 'object',
properties: {
billNumber: {
type: 'string',
description: 'Bill number (e.g., "C-47")',
},
session: {
type: 'string',
description: 'Parliamentary session (e.g., "44-1")',
},
},
required: ['billNumber', 'session'],
},
},
{
name: 'get_bill_debates',
description: 'Get House of Commons debates and speeches about a specific bill. Returns Hansard excerpts showing what MPs have said about the bill.',
input_schema: {
type: 'object',
properties: {
billNumber: {
type: 'string',
description: 'Bill number (e.g., "C-47")',
},
session: {
type: 'string',
description: 'Parliamentary session (e.g., "44-1")',
},
limit: {
type: 'integer',
description: 'Maximum number of statements to return (default: 50)',
},
},
required: ['billNumber', 'session'],
},
},
// ============================================
// Hansard/Debate Tools
// ============================================
{
name: 'search_hansard',
description: 'COMPREHENSIVE search through House of Commons debates (Hansard transcripts). Uses full-text search to find specific keywords, quotes, or topics in all parliamentary speeches. Returns complete speech excerpts with context, speaker information, dates, and related bills. This is the primary tool for finding what MPs have said about ANY issue in Parliament.',
input_schema: {
type: 'object',
properties: {
searchTerm: {
type: 'string',
description: 'Keywords or phrases to search for in debate transcripts. Supports boolean operators (AND, OR, NOT) and phrase matching with quotes. Examples: "climate change", "carbon tax AND emissions", "healthcare OR medicare"',
},
mpId: {
type: 'string',
description: 'Filter results to speeches by a specific MP (optional). Use the MP ID format like "pierre-poilievre"',
},
committeeCode: {
type: 'string',
description: 'Filter results to committee evidence/testimony (optional). Use committee code like "FINA" for Finance Committee, "HESA" for Health Committee. Only applies to Evidence documents (type "E").',
},
documentType: {
type: 'string',
description: 'Filter by document type (optional). "D" = House of Commons Debates (floor speeches), "E" = Committee Evidence/Testimony. Leave blank to search all types.',
enum: ['D', 'E'],
},
excludeProcedural: {
type: 'boolean',
description: 'Exclude procedural/administrative statements (default: false). Set to true to filter out routine procedural business and focus on substantive debate.',
},
startDate: {
type: 'string',
description: 'Filter speeches after this date (YYYY-MM-DD) (optional)',
},
endDate: {
type: 'string',
description: 'Filter speeches before this date (YYYY-MM-DD) (optional)',
},
language: {
type: 'string',
description: 'Search in English ("en") or French ("fr") transcripts (default: "en")',
enum: ['en', 'fr'],
},
limit: {
type: 'integer',
description: 'Maximum number of results to return (default: 50, max: 100). Increase for comprehensive topic research.',
},
},
required: ['searchTerm'],
},
},
{
name: 'get_recent_debates',
description: 'Get the most recent debates and statements from the House of Commons.',
input_schema: {
type: 'object',
properties: {
limit: {
type: 'integer',
description: 'Maximum number of debates to return (default: 20)',
},
},
},
},
// ============================================
// Committee Tools
// ============================================
{
name: 'get_committees',
description: 'Get a list of all parliamentary committees including their mandates, membership, and meeting schedules.',
input_schema: {
type: 'object',
properties: {
current: {
type: 'boolean',
description: 'Only return currently active committees (default: true)',
},
},
},
},
{
name: 'get_committee',
description: 'Get detailed information about a specific committee including members, mandate, and meeting history.',
input_schema: {
type: 'object',
properties: {
committeeCode: {
type: 'string',
description: 'Committee code (e.g., "FINA" for Finance Committee)',
},
},
required: ['committeeCode'],
},
},
{
name: 'get_committee_testimony',
description: 'Get witness testimony and statements from committee meetings. Useful for understanding expert input on legislation and policy issues.',
input_schema: {
type: 'object',
properties: {
committeeCode: {
type: 'string',
description: 'Committee code (e.g., "FINA")',
},
startDate: {
type: 'string',
description: 'Filter testimony after this date (YYYY-MM-DD)',
},
endDate: {
type: 'string',
description: 'Filter testimony before this date (YYYY-MM-DD)',
},
limit: {
type: 'integer',
description: 'Maximum number of testimonies to return (default: 50)',
},
},
required: ['committeeCode'],
},
},
// ============================================
// Accountability/Lobbying Tools
// ============================================
{
name: 'get_top_spenders',
description: 'Get the MPs who spent the most in a given fiscal quarter on office expenses, travel, hospitality, contracts, etc. Useful for expense accountability.',
input_schema: {
type: 'object',
properties: {
fiscalYear: {
type: 'integer',
description: 'Fiscal year (e.g., 2024)',
},
quarter: {
type: 'integer',
description: 'Quarter number (1-4)',
},
limit: {
type: 'integer',
description: 'Maximum number of MPs to return (default: 10)',
},
},
required: ['fiscalYear', 'quarter'],
},
},
{
name: 'detect_conflicts_of_interest',
description: 'Analyze potential conflicts of interest by cross-referencing MP voting records with lobbying activity and expenses. Shows if an MP voted on bills that were lobbied on by organizations they had financial dealings with.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'MP ID to analyze (optional - analyzes all MPs if not specified)',
},
billNumber: {
type: 'string',
description: 'Bill number to analyze lobbying for (optional)',
},
},
},
},
{
name: 'search_lobby_registrations',
description: 'Search lobbying registry to find who is lobbying the government and on what issues. Shows corporate and special interest influence on policy.',
input_schema: {
type: 'object',
properties: {
clientName: {
type: 'string',
description: 'Name of the organization doing the lobbying (e.g., "Pfizer", "Canadian Bankers Association")',
},
lobbyistName: {
type: 'string',
description: 'Name of the lobbyist',
},
subjectMatter: {
type: 'string',
description: 'Keywords in the subject matter being lobbied',
},
limit: {
type: 'integer',
description: 'Maximum number of registrations to return (default: 20)',
},
},
},
},
// ============================================
// Government Spending Tools
// ============================================
{
name: 'search_federal_contracts',
description: 'Search federal government contracts by vendor name, department, year, or amount. Shows who is receiving government contracts.',
input_schema: {
type: 'object',
properties: {
vendorName: {
type: 'string',
description: 'Vendor/company name to search for',
},
department: {
type: 'string',
description: 'Government department (e.g., "National Defence", "Public Services")',
},
year: {
type: 'integer',
description: 'Contract year (e.g., 2024)',
},
minAmount: {
type: 'number',
description: 'Minimum contract amount in dollars',
},
maxAmount: {
type: 'number',
description: 'Maximum contract amount in dollars',
},
limit: {
type: 'integer',
description: 'Maximum number of results (default: 20)',
},
},
},
},
{
name: 'get_top_contractors',
description: 'Get the top government contractors by total contract value. Shows which companies receive the most government money.',
input_schema: {
type: 'object',
properties: {
department: {
type: 'string',
description: 'Filter by department (optional)',
},
year: {
type: 'integer',
description: 'Filter by year (optional)',
},
limit: {
type: 'integer',
description: 'Number of top contractors to return (default: 10)',
},
},
},
},
{
name: 'search_political_contributions',
description: 'Search political donations/contributions by donor name, party, or amount. Shows who is funding political parties.',
input_schema: {
type: 'object',
properties: {
donorName: {
type: 'string',
description: 'Name of the donor (individual or organization)',
},
party: {
type: 'string',
description: 'Political party receiving donations (e.g., "Liberal", "Conservative")',
},
year: {
type: 'integer',
description: 'Contribution year',
},
minAmount: {
type: 'number',
description: 'Minimum donation amount',
},
maxAmount: {
type: 'number',
description: 'Maximum donation amount',
},
province: {
type: 'string',
description: 'Province of donor (e.g., "Ontario", "BC")',
},
limit: {
type: 'integer',
description: 'Maximum number of results (default: 20)',
},
},
},
},
{
name: 'get_top_political_donors',
description: 'Get the top political donors by total contribution amount. Shows who funds each political party.',
input_schema: {
type: 'object',
properties: {
party: {
type: 'string',
description: 'Filter by party (optional)',
},
year: {
type: 'integer',
description: 'Filter by year (optional)',
},
limit: {
type: 'integer',
description: 'Number of top donors to return (default: 10)',
},
},
},
},
{
name: 'get_party_fundraising',
description: 'Get fundraising summary for all political parties including total raised, number of donors, and average donation.',
input_schema: {
type: 'object',
properties: {
year: {
type: 'integer',
description: 'Contribution year (optional - returns all years if not specified)',
},
},
},
},
{
name: 'search_federal_grants',
description: 'Search federal grants and contributions by recipient, program, department, or amount.',
input_schema: {
type: 'object',
properties: {
recipientName: {
type: 'string',
description: 'Grant recipient name (organization or individual)',
},
programName: {
type: 'string',
description: 'Grant program name',
},
department: {
type: 'string',
description: 'Government department issuing the grant',
},
province: {
type: 'string',
description: 'Province of recipient',
},
year: {
type: 'integer',
description: 'Grant year',
},
minAmount: {
type: 'number',
description: 'Minimum grant amount',
},
maxAmount: {
type: 'number',
description: 'Maximum grant amount',
},
limit: {
type: 'integer',
description: 'Maximum number of results (default: 20)',
},
},
},
},
{
name: 'get_top_grant_recipients',
description: 'Get the top grant recipients by total funding received.',
input_schema: {
type: 'object',
properties: {
programName: {
type: 'string',
description: 'Filter by grant program (optional)',
},
year: {
type: 'integer',
description: 'Filter by year (optional)',
},
limit: {
type: 'integer',
description: 'Number of top recipients to return (default: 20)',
},
},
},
},
{
name: 'get_grant_program_spending',
description: 'Get spending breakdown by grant program showing total amount, number of grants, and unique recipients.',
input_schema: {
type: 'object',
properties: {
year: {
type: 'integer',
description: 'Filter by year (optional)',
},
limit: {
type: 'integer',
description: 'Number of programs to return (default: 50)',
},
},
},
},
{
name: 'trace_money_flow',
description: 'Comprehensive analysis of money flowing to or from an entity. Shows contracts, grants, donations, and lobbying activity for a company or organization.',
input_schema: {
type: 'object',
properties: {
entityName: {
type: 'string',
description: 'Name of the company/organization to trace (required)',
},
year: {
type: 'integer',
description: 'Filter by year (optional)',
},
includeContracts: {
type: 'boolean',
description: 'Include federal contracts (default: true)',
},
includeGrants: {
type: 'boolean',
description: 'Include grants received (default: true)',
},
includeContributions: {
type: 'boolean',
description: 'Include political donations made (default: true)',
},
includeLobbying: {
type: 'boolean',
description: 'Include lobbying activity (default: true)',
},
},
required: ['entityName'],
},
},
{
name: 'analyze_mp_finances',
description: 'Comprehensive financial analysis of an MP including expenses, lobbying contacts, and related organizations.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID (e.g., "pierre-poilievre")',
},
mpName: {
type: 'string',
description: 'MP name (alternative to mpId)',
},
fiscalYear: {
type: 'integer',
description: 'Fiscal year to analyze (optional)',
},
includeLobbying: {
type: 'boolean',
description: 'Include lobbying contacts (default: true)',
},
},
},
},
{
name: 'compare_party_funding',
description: 'Compare fundraising and donor patterns across political parties.',
input_schema: {
type: 'object',
properties: {
year: {
type: 'integer',
description: 'Year to compare (optional)',
},
includeDonorAnalysis: {
type: 'boolean',
description: 'Include analysis of top donors per party (default: true)',
},
minDonation: {
type: 'number',
description: 'Minimum donation to include in analysis (default: 0)',
},
},
},
},
{
name: 'government_spending_analysis',
description: 'High-level analysis of government spending patterns by department.',
input_schema: {
type: 'object',
properties: {
departmentName: {
type: 'string',
description: 'Specific department to analyze (optional)',
},
year: {
type: 'integer',
description: 'Year to analyze (optional)',
},
focus: {
type: 'string',
description: 'Focus area: "contracts", "grants", or "all" (default: "all")',
enum: ['contracts', 'grants', 'all'],
},
limit: {
type: 'integer',
description: 'Number of items per category (default: 10)',
},
},
},
},
{
name: 'analyze_industry_influence',
description: 'Comprehensive analysis of corporate/industry influence on Parliament. Shows lobbying organizations, communications, targeted government officials, and institutions for a specific industry.',
input_schema: {
type: 'object',
properties: {
industryKeyword: {
type: 'string',
description: 'Industry keyword to analyze (e.g., "oil", "tech", "pharmaceutical", "telecom", "banking")',
},
limit: {
type: 'integer',
description: 'Number of results per category (default: 10)',
},
},
required: ['industryKeyword'],
},
},
{
name: 'conflict_of_interest_check',
description: 'Cross-reference political contributions, lobbying activities, and government contracts/grants to identify potential conflicts of interest or concerning patterns for an organization or person.',
input_schema: {
type: 'object',
properties: {
entityName: {
type: 'string',
description: 'Name of person or organization to check',
},
year: {
type: 'integer',
description: 'Focus on specific year (optional)',
},
thresholdAmount: {
type: 'number',
description: 'Minimum contract/grant amount to flag (default: $100,000)',
},
},
required: ['entityName'],
},
},
// ============================================
// Petitions Tools
// ============================================
{
name: 'search_petitions',
description: 'Search e-petitions by keyword, sponsor, or category. Shows citizen engagement on issues.',
input_schema: {
type: 'object',
properties: {
keyword: {
type: 'string',
description: 'Search keyword in petition title or text',
},
sponsorName: {
type: 'string',
description: 'MP sponsor name',
},
category: {
type: 'string',
description: 'Petition category (e.g., "Health", "Environment", "Justice")',
},
status: {
type: 'string',
description: 'Petition status (e.g., "open", "closed", "presented")',
},
limit: {
type: 'integer',
description: 'Maximum results (default: 20)',
},
},
},
},
{
name: 'get_petition_details',
description: 'Get detailed information about a specific petition including full text, signatures, and government response.',
input_schema: {
type: 'object',
properties: {
petitionNumber: {
type: 'string',
description: 'Petition number (e.g., "E-4567")',
},
},
required: ['petitionNumber'],
},
},
{
name: 'get_mp_petitions',
description: 'Get all petitions sponsored by a specific MP.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID (e.g., "pierre-poilievre")',
},
category: {
type: 'string',
description: 'Filter by category (optional)',
},
limit: {
type: 'integer',
description: 'Maximum results (default: 20)',
},
},
required: ['mpId'],
},
},
// ============================================
// Advanced MP Analysis Tools
// ============================================
{
name: 'get_mp_voting_history',
description: 'Get comprehensive voting history for an MP including vote positions and patterns.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID (e.g., "pierre-poilievre")',
},
limit: {
type: 'integer',
description: 'Maximum votes to return (default: 50)',
},
},
required: ['mpId'],
},
},
{
name: 'get_vote_details',
description: 'Get detailed information about a specific vote including all MP positions.',
input_schema: {
type: 'object',
properties: {
voteId: {
type: 'string',
description: 'Vote ID or vote number',
},
includeBallots: {
type: 'boolean',
description: 'Include individual MP ballots (default: true)',
},
},
required: ['voteId'],
},
},
{
name: 'analyze_party_discipline',
description: 'Analyze how often MPs vote with their party. Shows discipline rate for each MP.',
input_schema: {
type: 'object',
properties: {
party: {
type: 'string',
description: 'Party to analyze (optional - analyzes all parties if not specified)',
},
},
},
},
{
name: 'compare_mp_performance',
description: 'Compare performance metrics across multiple MPs.',
input_schema: {
type: 'object',
properties: {
mpIds: {
type: 'array',
items: { type: 'string' },
description: 'List of MP IDs to compare',
},
},
required: ['mpIds'],
},
},
{
name: 'track_committee_activity',
description: 'Get committee memberships and activity for an MP.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID (required)',
},
},
required: ['mpId'],
},
},
{
name: 'analyze_mp_voting_participation',
description: 'Analyze MP voting participation rate including votes participated, total votes, and breakdown by vote type.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID (required)',
},
},
required: ['mpId'],
},
},
// ============================================
// Bill Analysis Tools
// ============================================
{
name: 'compare_party_bills',
description: 'Compare bill sponsorship across parties. Shows total bills, passed bills, and bills in various stages.',
input_schema: {
type: 'object',
properties: {},
},
},
{
name: 'get_bill_legislative_progress',
description: 'Get detailed legislative progress timeline for a bill.',
input_schema: {
type: 'object',
properties: {
billNumber: {
type: 'string',
description: 'Bill number (e.g., "C-47")',
},
session: {
type: 'string',
description: 'Parliamentary session (e.g., "44-1")',
},
},
required: ['billNumber', 'session'],
},
},
{
name: 'analyze_mp_bills',
description: 'Analyze bill sponsorship patterns for an MP.',
input_schema: {
type: 'object',
properties: {
mpId: {
type: 'string',
description: 'The MP ID (e.g., "pierre-poilievre")',
},
includeCoSponsored: {
type: 'boolean',
description: 'Include co-sponsored bills (default: true)',
},
},
required: ['mpId'],
},
},
// ============================================
// Extended Lobbying Tools
// ============================================
{
name: 'search_lobbying_communications',
description: 'Search lobbying communications by subject, date, or participants.',
input_schema: {
type: 'object',
properties: {
clientName: {
type: 'string',
description: 'Client/organization name',
},
lobbyistName: {
type: 'string',
description: 'Lobbyist name',
},
subjectKeyword: {
type: 'string',
description: 'Subject matter keyword',
},
officialName: {
type: 'string',
description: 'Government official contacted',
},
institution: {
type: 'string',
description: 'Government institution',
},
dateFrom: {
type: 'string',
description: 'Start date (YYYY-MM-DD)',
},
dateTo: {
type: 'string',
description: 'End date (YYYY-MM-DD)',
},
limit: {
type: 'integer',
description: 'Maximum results (default: 20)',
},
},
},
},
{
name: 'get_top_lobbying_clients',
description: 'Get the most active lobbying clients by number of communications, including their top subject areas.',
input_schema: {
type: 'object',
properties: {
limit: {
type: 'integer',
description: 'Number of top clients to return (default: 20)',
},
},
},
},
// ============================================
// Cross-Source Search Tools
// ============================================
{
name: 'search_topic_across_sources',
description: 'Search for a topic across multiple parliamentary sources including MPs, bills, contracts, and grants.',
input_schema: {
type: 'object',
properties: {
topic: {
type: 'string',
description: 'Topic or keyword to search',
},
sources: {
type: 'array',
items: { type: 'string' },
description: 'List of sources to search: mps, bills, contracts, grants (optional - searches all if not specified)',
},
limit: {
type: 'integer',
description: 'Maximum total results (default: 20)',
},
},
required: ['topic'],
},
},
// ============================================
// GC InfoBase Tools (Departmental Performance & Spending)
// ============================================
{
name: 'get_department_spending',
description: 'Get departmental spending data from GC InfoBase. Shows planned vs actual spending by program, with FTE counts. Use for questions about government department budgets and spending.',
input_schema: {
type: 'object',
properties: {
department: {
type: 'string',
description: 'Department name (e.g., "Health Canada", "Transport Canada")',
},
fiscalYear: {
type: 'string',
description: 'Fiscal year (e.g., "2023-24"). If omitted, returns all years.',
},
program: {
type: 'string',
description: 'Specific program name to filter by (optional)',
},
limit: {
type: 'integer',
description: 'Maximum number of results (default: 50)',
},
},
required: ['department'],
},
},
{
name: 'get_department_results',
description: 'Get departmental performance results from GC InfoBase. Shows targets, actual results, and whether targets were met. Use for questions about government accountability and performance.',
input_schema: {
type: 'object',
properties: {
department: {
type: 'string',
description: 'Department name (e.g., "Health Canada", "Transport Canada")',
},
fiscalYear: {
type: 'string',
description: 'Fiscal year (e.g., "2023-24"). If omitted, returns all years.',
},
program: {
type: 'string',
description: 'Specific program name to filter by (optional)',
},
limit: {
type: 'integer',
description: 'Maximum number of results (default: 50)',
},
},
required: ['department'],
},
},
{
name: 'compare_plan_vs_actual',
description: 'Compare what a department planned to spend/achieve vs what they actually delivered. Shows spending variance, FTE variance, and performance target success rate.',
input_schema: {
type: 'object',
properties: {
department: {
type: 'string',
description: 'Department name (e.g., "Health Canada")',
},
fiscalYear: {
type: 'string',
description: 'Fiscal year to analyze (e.g., "2023-24")',
},
},
required: ['department', 'fiscalYear'],
},
},
{
name: 'get_top_spending_departments',
description: 'Get the top spending federal departments for a given fiscal year. Shows total spending, FTEs, and program counts.',
input_schema: {
type: 'object',
properties: {
fiscalYear: {
type: 'string',
description: 'Fiscal year (e.g., "2023-24"). If omitted, returns totals across all years.',
},
limit: {
type: 'integer',
description: 'Number of departments to return (default: 20)',
},
},
},
},
{
name: 'search_gc_infobase',
description: 'Search GC InfoBase for departments, programs, or performance indicators. Returns matching expenditure and result records.',
input_schema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'Search term (department name, program name, or indicator)',
},
fiscalYear: {
type: 'string',
description: 'Filter by fiscal year (e.g., "2023-24")',
},
limit: {
type: 'integer',
description: 'Maximum number of results (default: 50)',
},
},
required: ['query'],
},
},
// ============================================
// ATIP Request Tools (Access to Information)
// ============================================
{
name: 'search_atip_requests',
description: 'Search Access to Information (ATIP) request summaries. Shows what Canadians have asked for through ATIP and what was disclosed. Useful for transparency and accountability research.',
input_schema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'Search term to find in request summaries (e.g., "immigration", "vaccines", "contracts")',
},
organization: {
type: 'string',
description: 'Filter by government organization (e.g., "Health Canada", "IRCC")',
},
year: {
type: 'integer',
description: 'Filter by year (e.g., 2024)',
},
disposition: {
type: 'string',
description: 'Filter by disposition code: "DA" (All Disclosed), "DP" (Partially Disclosed), "NR" (No Records), "EX" (Exempted), "AB" (Abandoned)',
},
limit: {
type: 'integer',
description: 'Maximum results (default: 50)',
},
},
},
},
{
name: 'get_atip_organization_stats',
description: 'Get ATIP statistics by government organization. Shows total requests, pages released, and disclosure rates. Useful for comparing transparency across departments.',
input_schema: {
type: 'object',
properties: {
organization: {
type: 'string',
description: 'Filter by organization name (optional - shows all if not specified)',
},
year: {
type: 'integer',
description: 'Filter by year (optional)',
},
limit: {
type: 'integer',
description: 'Number of organizations to return (default: 20)',
},
},
},
},
{
name: 'get_atip_trends',
description: 'Get ATIP trends over time for an organization. Shows request volumes and disposition breakdowns by year. Useful for understanding transparency trends.',
input_schema: {
type: 'object',
properties: {
organization: {
type: 'string',
description: 'Organization to analyze (optional - shows all organizations if not specified)',
},
years: {
type: 'integer',
description: 'Number of years to include (default: 5)',
},
},
},
},
// ============================================
// Government Consultations Tools
// ============================================
{
name: 'search_consultations',
description: 'Search government consultations. Shows public engagement activities by federal departments including topics, timelines, and participation methods. Useful for finding opportunities to participate in policy development.',
input_schema: {
type: 'object',
properties: {
query: {
type: 'string',
description: 'Search term to find in consultation title/description (e.g., "climate", "housing", "health")',
},
organization: {
type: 'string',
description: 'Filter by government organization (e.g., "Environment and Climate Change Canada")',
},
subject: {
type: 'string',
description: 'Filter by subject code (e.g., "EN" for Environment, "HE" for Health, "IM" for Immigration)',
},
status: {
type: 'string',
description: 'Filter by status: "O" (Open), "C" (Completed), "P" (Planned)',
},
year: {
type: 'integer',
description: 'Filter by start year (e.g., 2024)',
},
limit: {
type: 'integer',
description: 'Maximum results (default: 50)',
},
},
},
},
{
name: 'get_open_consultations',
description: 'Get currently open government consultations. Shows ongoing opportunities for public participation. Use this when users want to know how they can participate in government policy development.',
input_schema: {
type: 'object',
properties: {
organization: {
type: 'string',
description: 'Filter by government organization (optional)',
},
subject: {
type: 'string',
description: 'Filter by subject code (e.g., "EN" for Environment)',
},
limit: {
type: 'integer',
description: 'Maximum results (default: 50)',
},
},
},
},
{
name: 'get_consultation_stats',
description: 'Get consultation statistics by government organization. Shows total consultations, open/completed counts, and report availability. Useful for understanding which departments engage most with the public.',
input_schema: {
type: 'object',
properties: {
organization: {
type: 'string',
description: 'Filter by organization name (optional - shows all if not specified)',
},
year: {
type: 'integer',
description: 'Filter by start year (optional)',
},
limit: {
type: 'integer',
description: 'Number of organizations to return (default: 20)',
},
},
},
},
// ============================================
// Departmental Travel & Hospitality Tools
// ============================================
{
name: 'search_departmental_travel',
description: 'Search federal departmental travel expenses. Find travel by department, traveler name, destination, or amount. Shows trips by senior officials, ministers, and public servants.',
input_schema: {
type: 'object',
properties: {
department: {
type: 'string',
description: 'Filter by department name (e.g., "Health Canada", "Finance")',
},
name: {
type: 'string',
description: 'Filter by traveler name',
},
destination: {
type: 'string',
description: 'Filter by destination (e.g., "Washington", "London")',
},
year: {
type: 'integer',
description: 'Filter by travel year (e.g., 2024)',
},
minAmount: {
type: 'number',
description: 'Minimum expense amount to filter (e.g., 5000)',
},
disclosureGroup: {
type: 'string',
description: 'Filter by disclosure group (e.g., "Minister", "Deputy Minister")',
},
limit: {
type: 'integer',
description: 'Maximum results (default: 50)',
},
},
},
},
{
name: 'search_departmental_hospitality',
description: 'Search federal departmental hospitality expenses. Find hospitality events by department, host name, location, or amount. Shows events hosted by senior officials and public servants.',
input_schema: {
type: 'object',
properties: {
department: {
type: 'string',
description: 'Filter by department name',
},
name: {
type: 'string',
description: 'Filter by host name',
},
location: {
type: 'string',
description: 'Filter by event location',
},
year: {
type: 'integer',
description: 'Filter by year (e.g., 2024)',
},
minAmount: {
type: 'number',
description: 'Minimum expense amount to filter',
},
disclosureGroup: {
type: 'string',
description: 'Filter by disclosure group (e.g., "Minister", "Deputy Minister")',
},
limit: {
type: 'integer',
description: 'Maximum results (default: 50)',
},
},
},
},
{
name: 'get_top_travelers',
description: 'Get top travelers by total spending. Shows who travels most in the federal government. Useful for accountability and spending analysis.',
input_schema: {
type: 'object',
properties: {
department: {
type: 'string',
description: 'Filter by department (optional)',
},
year: {
type: 'integer',
description: 'Filter by travel year (optional)',
},
limit: {
type: 'integer',
description: 'Number of travelers to return (default: 20)',
},
},
},
},
{
name: 'get_department_travel_spending',
description: 'Get travel spending summary by department. Shows total spending, trip counts, and breakdown by category (airfare, lodging, meals).',
input_schema: {
type: 'object',
properties: {
year: {
type: 'integer',
description: 'Filter by travel year (optional)',
},
limit: {
type: 'integer',
description: 'Number of departments to return (default: 20)',
},
},
},
},
{
name: 'get_department_hospitality_spending',
description: 'Get hospitality spending summary by department. Shows total spending, event counts, and total attendees.',
input_schema: {
type: 'object',
properties: {
year: {
type: 'integer',
description: 'Filter by year (optional)',
},
limit: {
type: 'integer',
description: 'Number of departments to return (default: 20)',
},
},
},
},
// ============================================
// Fact-Check Tools
// ============================================
{
name: 'fact_check_claim',
description: 'Verify a political claim against parliamentary records, voting data, and official sources. Returns a verdict (TRUE, FALSE, MISLEADING, NEEDS_CONTEXT, UNVERIFIABLE) with confidence score, rationale, and citations. Use this when a user asks to verify a claim about Canadian politics, MPs, legislation, or government spending.',
input_schema: {
type: 'object',
properties: {
claim: {
type: 'string',
description: 'The claim to fact-check (e.g., "The PM voted against Bill C-123", "The government spent $1 billion on project X")',
},
mode: {
type: 'string',
enum: ['fast', 'deep'],
description: 'Verification mode: "fast" (~4 seconds, fewer sources) or "deep" (~15 seconds, more thorough). Default is "fast".',
},
},
required: ['claim'],
},
},
// ============================================
// Navigation Tools
// ============================================
{
name: 'navigate_to_hansard',
description: 'Navigate the user to the Hansard search page with pre-filled search parameters. Use this when the user wants to explore or browse Hansard records beyond just getting search results. This opens a dedicated page with cards displaying speeches, advanced filtering options, and the ability to interact with results.',
input_schema: {
type: 'object',
properties: {
searchTerm: {
type: 'string',
description: 'Search query to pre-fill (optional)',
},
mpId: {
type: 'string',
description: 'Filter by specific MP (optional)',
},
party: {
type: 'string',
description: 'Filter by party (optional)',
},
documentType: {
type: 'string',
description: 'Filter by document type: "D" (Debates) or "E" (Committee Evidence) (optional)',
enum: ['D', 'E'],
},
excludeProcedural: {
type: 'boolean',
description: 'Exclude procedural statements (optional)',
},
startDate: {
type: 'string',
description: 'Filter speeches after this date (YYYY-MM-DD) (optional)',
},
endDate: {
type: 'string',
description: 'Filter speeches before this date (YYYY-MM-DD) (optional)',
},
},
required: ['searchTerm'],
},
},
];