Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Add to dataset
BRAINTRUST_MCP_ADD_TO_DATASETAdd up to 1000 project log rows to a Braintrust dataset by row ID, like the UI's "Add to dataset", without reading and re-sending their contents. Find candidate rows with sql_query against project_logs, then pass their `id` values. Each copied row keeps the log's input, metadata, and tags, takes its expected value from the log's expected (or output), and links back to the source log via origin. Target an existing dataset by ID or name. Set create_if_missing only when a new named dataset should be created.
Create dashboard sql
BRAINTRUST_MCP_CREATE_DASHBOARD_SQLCreate a project-scoped dashboard, optionally containing SQL charts that were already previewed with generate_dashboard_chart_sql. A dashboard is what list_monitoring_views and get_monitoring_view call a Monitoring view. Only call this when the user explicitly asks to create or save a dashboard. Pass each returned chartConfig unchanged in the charts array, using a one-element array for a single chart. Pass the preview timeFrame separately as the optional dashboard-level timeFrame; relative presets such as "3d" remain live. Omit timeFrame to use the dashboard default.
Create human review score
BRAINTRUST_MCP_CREATE_HUMAN_REVIEW_SCORECreate a native Human Review score definition for a project: categorical choices, a numeric slider, or a free-form text field such as Review notes. Call once per score. Fails if the name already exists.
Create protected field rule
BRAINTRUST_MCP_CREATE_PROTECTED_FIELD_RULEAdd a protected field rule to a scope's policy, creating the policy if needed. 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). Ingest rules (stage "ingest", action "redact") redact detected entity_types inside field_paths before data is stored. Read rules (stage "read", action "hide") hide field_paths from readers who match protect_when and do not match allow_when. field_paths are arrays of keys or indexes, such as [["input"], ["metadata", "email"]]. protect_when and allow_when are expressions over row, partition, principal, and credential, for example "true", 'principal.user_id in ["<user id>"]', or '"<group id>" in principal.group_ids'. Read rules only support principal.user_id and principal.group_ids conditions.
Generate dashboard chart sql
BRAINTRUST_MCP_GENERATE_DASHBOARD_CHART_SQLGenerate a SQL-backed dashboard chart configuration for visualizing data from project_logs. The chart's query is authored directly as SQL, so it supports aggregates and shapes the structured chart definition cannot express: several percentiles of one field, expressions over multiple metrics, ratios of aggregates, count(distinct ...), and grouping by a time bucket plus another column. WRITING chartSql: - Every non-aggregate column you SELECT must also appear in a GROUP BY. The chart adds the time bucket, but never the GROUP BY — write it yourself. Those columns become the chart's groupings (one series per value); the aggregates are the plotted values. - Use count(1), not count(), to count rows. - For a percentage, rate, share, or proportion, select the raw fraction and set unitType to percent: count(CASE WHEN error IS NOT NULL THEN 1 END) / count(1), or sum(a) / sum(b). The chart multiplies by 100 when it renders, so a leading 100.0 * renders a true 68% as 6612% and a true 0.98 as 9800%. Never multiply by 100 yourself, and expect the selected value to sit between 0 and 1. CHOOSING A DATA SHAPE: - Default to the span shape, which is what project_logs() returns with no shape argument: one row per span. Aggregate over it for anything span-level — counts of LLM calls, per-call latency, token and cost sums. - To measure one span kind, filter in WHERE when every measure in the chart uses that kind: WHERE is_root lets the query skip other spans before reading them. Use a conditional such as avg(CASE WHEN is_root THEN metrics.duration ELSE NULL END) only when measures need different spans, since WHERE drops rows from every measure; a conditional evaluates every span in the time range, which is much slower on large projects. - Trace-level columns exist only on the summary shape, one row per trace: FROM project_logs(shape => 'summary'). These are metrics.llm_calls, metrics.total_tokens, metrics.prompt_tokens, and metrics.estimated_cost — always with the metrics. prefix, since the bare name is not a column. On the default shape they are null. Use summary only when the question is genuinely per-trace, such as end-to-end request latency or tokens per conversation, and expect one row per trace rather than per span. - Use summary sparingly: when the dashboard has any filter applied, the shape is rewritten to 'traces', and the trace-level columns are no longer there. A chart that reads correctly on an unfiltered page can break once a viewer filters it. BY CHART TYPE: - timeseries: return one or more aggregate values plus any non-aggregate groupings; omit the time column and bucket, the chart adds them. SELECT metadata.model AS model, avg(metrics.duration) AS duration FROM project_logs() GROUP BY model - singleValue: return at least one aggregate; only the first is displayed. SELECT count(1) AS spans FROM project_logs() - toplist: return at least one grouping plus the aggregates to rank by; the chart applies the sort and limit. SELECT metadata.model AS model, sum(metrics.tokens) AS tokens FROM project_logs() GROUP BY model - table: return an explicit projection with unique output names; an authored LIMIT is preserved. WHAT THE DASHBOARD ADDS AT RENDER TIME: - The time bucket and time column for timeseries charts. Do not select a time column or bucket yourself. - The timeframe filter, the page's filters, and any page-level group-by. - The project, if you write project_logs() with no argument. Anything you put in WHERE is combined with those, so filter only for what the chart itself needs. Column names vary by project. Inspect the actual columns with infer_schema or a sql_query before writing chartSql rather than assuming a field exists. Then run the chartSql itself with sql_query and read the rows back before generating the chart. Check that the values are the magnitude you expect, that the grouping columns hold real values rather than nulls, and that the row count is plausible. No rows, an all-null column, or a number that is orders of magnitude off means the query is wrong — fix it and re-run rather than charting it. For that check only, add a LIMIT and a time filter so the query stays cheap; the chartSql you submit must not contain either. When creating or editing a chart for a saved dashboard, read get_monitoring_view first and pass its view_id to this tool. Apply that view's saved search filters with its span/trace filter scope to your sql_query validation too, so the checked values and your answer match the preview. Keep dashboard filters out of chartSql.
Send feedback
BRAINTRUST_MCP_SEND_FEEDBACKSend feedback to the Braintrust team about a problem with this MCP server, such as a missing capability, a tool error that looks like a server bug, malformed or inconsistent output, or parameters that are confusing or rejected despite matching the schema. Use it when the user asks to report a problem, or when the user agrees to a report you offered. The report goes to the Braintrust team and does not change any project data. Refer to tools and parameters by name and to Braintrust objects by ID. Do not include trace or span contents, dataset rows, prompts, model inputs or outputs, query results, or argument values copied from project data.