Developer Tools · Data & Analytics

Braintrust MCP

Query Braintrust logs with SQL, run evals and evaluators, manage prompts, datasets, dashboards, alerts and Topics automations through Braintrust's hosted MCP server.

Tools

This is a reference catalogue. Tools cannot be configured or run from this page.

  • Add to human review queue

    Add existing project log traces, experiment traces, or dataset rows to Human Review, optionally assigning individual reviewers. Omit experiment_id and dataset_id to target project logs, or provide exactly one to select another source in the project. Marks selected rows PENDING; rejects the entire batch if any row is already COMPLETE, since prior scores cannot represent a new review attempt. Use log_row_ids from sql_query and resolve reviewers with lookup_users. Omit assignee_user_ids to preserve existing reviewers, or pass an empty array to flag without assignment. In Loop automations, enable this write tool explicitly in the automation's tool permissions.

  • Create environment update alert

    Create an alert for environment updates. Use config.environment_filter to limit notifications to specific environment slugs, or omit it to match all environments.

  • Create evaluator

    Create a versioned Braintrust LLM or inline code evaluator. Set output_type to score for numeric scores or classification for categorical labels. For an LLM score evaluator, provide choice_scores. For an LLM classification evaluator, provide choices without numeric mappings. By default, the tool fails if the slug already exists; set if_exists to replace to create a new version, or ignore to leave the existing evaluator unchanged.

  • Create facet

    Create a versioned Braintrust facet that extracts structured information from spans or traces. Before using this tool, load and follow "braintrust/topics-workflow" with load_braintrust_skill. Topics and topic-classification requests use that workflow. This is a deployment/promotion tool, not a prompt-testing tool. Develop with inline test_facet_on_trace calls and run_eval experiments first; do not create a facet merely to test a candidate. Facet extraction always uses Braintrust's built-in facet model; callers do not select a model. The project default preprocessor is used when none is provided. By default, the tool fails if the slug already exists; set if_exists to replace to create a new version, or ignore to leave the existing facet unchanged.

  • Create log alert

    Create an alert for individual matching project logs. config.btql_filter is a boolean expression, not a SELECT query, and config.interval_seconds throttles repeated notifications without aggregating logs.

  • Create preprocessor

    Create a versioned Braintrust preprocessor from inline JavaScript using the same QuickJS runtime as the Braintrust UI. When the preprocessor is for Topics or a facet, first load and follow "braintrust/topics-workflow" with load_braintrust_skill. By default, the tool fails if the slug already exists; set if_exists to replace to create a new version, or ignore to leave the existing preprocessor unchanged.

  • Create prompt

    Create a versioned Braintrust prompt using the same function representation as project.prompts.create() and bt functions push. Provide either a completion-style prompt or chat messages. By default, the tool fails if the slug already exists; set if_exists to replace to create a new version, or ignore to leave the existing prompt unchanged.

  • Create scheduled loop job

    Create a custom Loop job that runs on an interval or cron schedule over a recent project-data window. The config must include Loop instructions and cannot include a threshold, so the job runs for every scheduled window. Delivery actions are exposed to Loop as tools.

  • Create threshold alert

    Create a threshold alert for an aggregate over a recent project-data window. Use this for averages, counts, rates, percentages, percentiles, distributions, or other conditions evaluated on a schedule. config.threshold.calculation.btql_query must return at most one row with the numeric or null column named by config.threshold.calculation.output.value_column. Put any minimum sample size in the query, and do not add absolute time bounds because the runtime supplies the evaluation window. Use config.window.evaluation_delay_seconds when ingestion or asynchronous scoring arrives late. config.threshold.policy.pending_seconds controls how long a breach must persist, while renotify_interval_seconds controls reminders.

  • Enable topics automation

    Enable Topics for a Braintrust project. Before using this tool, load and follow "braintrust/topics-workflow" with load_braintrust_skill, then inspect existing automations with list_automations using kind "topic". Provide a distinct name to create an additional Topics automation; reusing a name returns the existing automation without changing it. This creates the configured facet topic maps, supports span, trace, or group scope, and defaults new automations to trace scope and the Task facet when omitted. It seeds processing for new traffic but does not rewind historical data.

  • Fail dashboard section

    Report a failure for a precomputed dashboard section using the target and revision from its computation request. Keeps the last successful widgets.

  • Publish dashboard section

    Publish one precomputed chart, Markdown note, or insight to a registered dashboard artifact target. Use the exact project_id, view_id, group_id, chart_id and revision from the automation run. Publish widgets:[] with unchanged:true when no update is needed. The server rejects outdated runs and unregistered targets.

  • Rewind topics automation

    Rewind an existing Topics automation to process historical data from an explicit start time or recent window. Before using this tool, load and follow "braintrust/topics-workflow" with load_braintrust_skill. Estimate the eligible population and obtain authorization for the historical scope before calling it.

  • Save dataset custom view

    Create or update a versioned custom view that reviewers use to label rows of a dataset. Returns a link that opens the dataset with this view selected. By default, the tool fails if the slug already exists; set if_exists to replace to create a new version of that view, or ignore to leave it unchanged. To update or reuse an existing view, first read its code with list_dataset_custom_views.

  • Set automation status

    Pause or activate an alert, scheduled job, or online scoring rule. This controls configured online scoring rules, not reusable scorer functions. Repeating the current status is a successful no-op.

  • Set project default preprocessor

    Set or clear the default preprocessor for a Braintrust project. When configuring Topics, first load and follow "braintrust/topics-workflow" with load_braintrust_skill. Pass a saved preprocessor reference, a global preprocessor such as "thread", or null to restore the built-in default. This changes the default used by facets and other project functions that do not explicitly select a preprocessor.

  • Set project session id field

    Configure the project's session or conversation ID field and create its bloom index. Inspect multiple traces to identify the metadata or span_attributes field linking turns of the same conversation. Automatic discovery must leave only_if_unset true to preserve existing configuration. Explicit overrides require project update access. If the identifier exists only in input or output, report a tracing improvement pattern instead of configuring it.

  • Set project user id field

    Configure the project's derived end-user ID field and create its bloom index. Inspect traces to identify the application's end user in metadata or span_attributes. Automatic discovery must leave only_if_unset true to preserve existing configuration. Explicit overrides require project update access. If the identifier exists only in input or output, report a tracing improvement pattern instead of configuring it.

  • Unpin topic maps

    Remove version pins from topic maps on an existing Topics automation so they classify new traffic with each topic map's latest version. Before using this tool, load and follow "braintrust/topics-workflow" with load_braintrust_skill and inspect the current automation with list_automations using kind "topic". This only removes the version from the selected topic map references; facets, other topic maps, filters, and settings are unchanged. Labels change for new traffic only; historical data keeps its labels unless the automation is rewound. Before calling it, tell the user which topic maps will be unpinned and get explicit approval.

  • Update debug report

    Save or replace the diagnosis report for one trace. Use this after identifying concrete failure modes and evidence, or when a user asks to edit the existing diagnosis. Pass the complete replacement report, not a partial patch. Every evidence item should identify its supporting span and exact field or JSON path.

Page 1 / 2Next