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.

  • Delete protected field rule

    Delete a protected field rule by id. A policy is identified by scope_object_type (organization, project_group_projects, or project), scope_object_id, and restrict_object_type (project_log by default; use dataset for dataset rules).

  • Edit dataset rows

    Insert, update, or delete up to 1000 Braintrust dataset rows using explicit operations. Target an existing dataset by ID or name. Set create_if_missing only when a new named dataset should be created.

  • Run eval

    Run a Braintrust experiment through the authenticated Eval API with a hosted dataset, inline rows, or a prior experiment, any saved or inline functional task, and zero or more saved or inline scorers. When a prior experiment is used as data, its outputs become expected values unless an expected value was already recorded. This does not require sandbox credentials. It creates an experiment and may execute user-supplied code or invoke AI providers, so it can incur compute and model usage. The MCP service supplies the caller's Braintrust token, forces streaming for long runs, and returns the experiment start metadata and final summary.

  • Run scheduled loop job

    Run a saved active scheduled Loop job using the same execution path as Run now in Braintrust. Runs its configured delivery actions and requires project update permission. Returns submission confirmation; use list_scheduled_loop_job_runs to find run links and inspect Past runs in Braintrust for completed output. Repeated calls can start additional runs, so do not resubmit to poll for progress.

  • Set topics automation

    Update an existing Topics automation's configuration. 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 changes facets, topic maps, scope, filters, sampling, or timing without rewinding historical data. Omitted settings keep their current values. facets only adds: each new facet gets a new topic map that has no topics until it is generated, and facets that are already configured are left unchanged. Removal is explicit: remove_facets removes facets and the topic maps generated from them, and remove_topic_map_ids removes specific topic maps. Removed topic maps' topics disappear from the Topics page. list_automations shows each topic map's source facet and whether it has topics. To switch a facet's version, add the new version and remove the old one in the same call. Calls that remove facets or topic maps are not safe to repeat: a repeated removal fails, and a repeated facet regeneration creates another new topic map. This tool cannot change a topic map's version pin; use unpin_topic_maps. Before adding or removing facets or topic maps, describe the changes to the user and get explicit approval.

  • Test evaluator

    Run one saved, global, or inline evaluator on representative inputs without writing results. Inputs may be inline evaluator rows containing fields such as input, output, expected, and metadata, or canonical span, trace, and group references. Inline rows can include only the fields the evaluator needs. The function field accepts a saved function_id, a global_function, or inline_evaluator using the same definition as create_evaluator. Inline evaluators do not need to be saved first. Inline code must define a top-level handler function. Use representative passes, failures, and ambiguous cases before creating an online-scoring rule.

  • Test facet on trace

    Run an inline facet definition with a saved, global, inline, or project-default preprocessor on one to ten canonical span, trace, or group references concurrently using the same preview path as the Braintrust UI. Use run_eval for larger sets. Before using this tool, load and follow "braintrust/topics-workflow" with load_braintrust_skill. Do not use one or a few previews as a substitute for its representative-trace discovery stage. Inline facet previews use Braintrust's built-in facet model; callers do not select a model. This may call an AI provider and create invocation logs, but it does not write the facet result to the source trace.

  • Test preprocessor on trace

    Run a saved, global, or inline preprocessor on one to 50 canonical span, trace, or group references concurrently using the same preview path as the Braintrust UI. For trace and group references, a custom preprocessor runs independently on each source span. Top-level array items are merged in trace order and exact-deduplicated; distinct joined transcript strings remain separate items, so return atomic items such as {role, content} for conversations. Each result is capped at 128 KiB, and model-visible previews share a 128 KiB budget. Use fewer inputs for more preview detail and run_eval for larger sets. When testing for Topics or a facet, first load and follow "braintrust/topics-workflow" with load_braintrust_skill. This executes code and may create invocation logs, but it does not write a score to the source trace.

  • Update dashboard sql

    Apply one or more SQL chart or section edits to an existing project dashboard. A dashboard is what list_monitoring_views and get_monitoring_view call a Monitoring view. Pass project_id and view_id. For a single chart edit, set the top-level operation to exactly insert, update, or remove. For section edits or bulk edits, pass an operations array instead; all operations are applied in order with one save. insert_group creates a section containing the provided existing chart_ids. remove_group deletes the section and keeps its charts at the section's position. Use get_monitoring_view first and copy its existing chart_id values unchanged. Every chart edit must include these fields, whether at the top level or inside operations: - insert: { operation: "insert", chart: chartConfig } - update: { operation: "update", chart_id: existingChartId, chart: chartConfig } - remove: { operation: "remove", chart_id: existingChartId } If the preview result is JSON text, parse it before reading chartConfig. For insert and update, chart must contain the complete chartConfig returned by generate_dashboard_chart_sql, even when the chart was already previewed. For batches, put each complete edit in operations and omit the top-level operation, chart_id, and chart fields. Only call this when the user explicitly asks to save the change.