Skip to content

docs(cli): Expand and improve the MCP server and dev CLI command#3225

Merged
nicktrn merged 1 commit intomainfrom
docs/mcp-dev-enhancements
Apr 13, 2026
Merged

docs(cli): Expand and improve the MCP server and dev CLI command#3225
nicktrn merged 1 commit intomainfrom
docs/mcp-dev-enhancements

Conversation

@ericallam
Copy link
Copy Markdown
Member

Depends on #3224

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 15, 2026

⚠️ No Changeset found

Latest commit: 9f347ee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 15, 2026

Walkthrough

This pull request updates documentation and OpenAPI specifications to introduce new query API capabilities. It adds two new REST endpoints (for querying schema and listing dashboards), documents a new --readonly CLI flag for install-mcp to prevent AI-driven modifications, introduces Profile Tools documentation, and revises query observability documentation with a new llm_metrics table and column rename (value → metric_value) with corresponding example updates across TRQL and SQL snippets.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description provides only 'Depends on #3224' with no meaningful content; it is missing all required template sections including Testing, Changelog, and a substantive overview of changes. Complete the PR description by filling in the template sections: Testing (steps taken), Changelog (summary of changes), and optionally Screenshots. Explain what this PR accomplishes beyond its dependency.
Title check ❓ Inconclusive The title describes documentation changes to MCP/CLI, but the changeset includes substantial additions to API documentation endpoints, query schema, dashboards, observability metrics, and OpenAPI spec updates—broader scope than title suggests. Clarify whether 'MCP server and dev CLI command' fully encompasses API documentation additions, or consider a more comprehensive title like 'docs: Expand MCP documentation and add query API endpoints'.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/mcp-dev-enhancements
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

@ericallam ericallam marked this pull request as ready for review April 13, 2026 13:26
@nicktrn nicktrn merged commit c09983e into main Apr 13, 2026
13 of 14 checks passed
@nicktrn nicktrn deleted the docs/mcp-dev-enhancements branch April 13, 2026 13:27
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

View 1 additional finding in Devin Review.

Open in Devin Review


- `runs`: contains all task run data including status, timing, costs, and task output. Run metadata (key-value set in your task) is not available on the Query page.
- `metrics`: contains metrics data for your runs including CPU, memory, and your custom metrics
- `llm_metrics`: contains LLM/AI metrics including token usage, costs, latency, and model performance data from GenAI spans
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 llm_metrics table documented as available but not yet in querySchemas

The new line at docs/observability/query.mdx:10 lists llm_metrics as an available table. However, apps/webapp/app/v3/querySchemas.ts:602 shows querySchemas only contains [runsSchema, metricsSchema] — no llm_metrics schema exists anywhere in the codebase. If this docs PR merges before the corresponding feature code, users will see llm_metrics listed as available and attempt to query it, resulting in errors. Worth confirming the feature code lands before or alongside this PR.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +131 to +216
## Profile Tools

### whoami

Show the current authenticated user, active CLI profile, email, and API URL.

**Example usage:**
- `"Who am I logged in as?"`
- `"What profile am I using?"`

### list_profiles

List all configured CLI profiles and which one is currently active.

**Example usage:**
- `"What profiles do I have?"`
- `"Show me my Trigger.dev profiles"`

### switch_profile

Switch the active CLI profile for this MCP session. This changes which Trigger.dev account and API URL are used for all subsequent tool calls.

**Example usage:**
- `"Switch to my production profile"`
- `"Use the staging profile"`

## Query and Analytics Tools

### get_query_schema

Get the schema for TRQL queries, including all available tables, their columns, data types, descriptions, and allowed values. Call this before using the query tool to understand what data is available.

**Example usage:**
- `"What tables and columns can I query?"`
- `"Show me the query schema"`

### query

Execute a TRQL query against your Trigger.dev data. TRQL is a SQL-style query language for analyzing runs, metrics, and LLM usage.

**Example usage:**
- `"How many runs failed in the last 7 days?"`
- `"Show me the top 10 most expensive tasks"`
- `"Query the average execution duration by task"`

### list_dashboards

List available built-in dashboards with their widgets. Each dashboard contains pre-built queries for common metrics.

**Example usage:**
- `"What dashboards are available?"`
- `"Show me the dashboard widgets"`

### run_dashboard_query

Execute a single widget query from a built-in dashboard. Use `list_dashboards` first to see available dashboards and widget IDs.

**Example usage:**
- `"Run the total runs widget from the overview dashboard"`
- `"Show me the LLM cost over time from the AI dashboard"`

## Dev Server Tools

### start_dev_server

Start the Trigger.dev dev server (`trigger dev`) in the background. Waits up to 30 seconds for the worker to be ready.

**Example usage:**
- `"Start the dev server"`
- `"Run trigger dev"`

### stop_dev_server

Stop the running Trigger.dev dev server.

**Example usage:**
- `"Stop the dev server"`

### dev_server_status

Check the status of the dev server and view recent output. Shows whether it is stopped, starting, ready, or has errors.

**Example usage:**
- `"Is the dev server running?"`
- `"Show me the dev server logs"`
- `"Are there any build errors?"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 New MCP tools documented but not verified in MCP server code

The docs/mcp-tools.mdx update documents many new MCP tools: whoami, list_profiles, switch_profile, get_query_schema, query, list_dashboards, run_dashboard_query, start_dev_server, stop_dev_server, dev_server_status. A quick check of packages/cli-v3/src/dev/mcpServer.ts shows only limited dashboard references. These tools may exist in a parallel feature branch. Reviewer should confirm these tools are implemented before merging the docs.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants