{ "name": "query", "description": "Execute a TRQL query against your Trigger.dev data. TRQL is a SQL-style query language for analyzing runs, metrics, and LLM usage. Call the get_query_schema tool first to discover available tables and columns before writing a query.", "inputSchema": { "type": "object", "properties": { "projectRef": { "type": "string", "description": "The trigger.dev project ref, starts with proj_. We will attempt to automatically detect the project ref if running inside a directory that includes a trigger.config.ts file, or if you pass the --project-ref option to the MCP server." }, "configPath": { "type": "string", "description": "The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the root dir (like in a monorepo setup). If not provided, we will try to find the config file in the current working directory" }, "environment": { "type": "string", "enum": [ "dev", "staging", "prod", "preview" ], "description": "The environment to get tasks for", "default": "dev" }, "branch": { "type": "string", "description": "The branch to get tasks for, only used for preview environments" }, "query": { "type": "string", "description": "The TRQL query to execute. TRQL is a SQL-style language for analyzing your Trigger.dev data. Use the get_query_schema tool first to discover available tables and columns." }, "scope": { "type": "string", "enum": [ "environment", "project", "organization" ], "default": "environment", "description": "Data access scope. 'environment' (default) limits to the current environment, 'project' spans all environments, 'organization' spans all projects." }, "period": { "type": "string", "description": "Time period shorthand, e.g. '1h', '7d', '30d'. Mutually exclusive with from/to." }, "from": { "type": "string", "description": "Start of time range (ISO 8601). Must be paired with 'to'." }, "to": { "type": "string", "description": "End of time range (ISO 8601). Must be paired with 'from'." } }, "required": [ "query" ], "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" } }