Volver al catálogo

Braintrust MCP

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.

Acciones
60
Triggers
0
Autenticación
—
OAuth gestionado
No
Información técnica: el detalle de parámetros, schemas y triggers de esta página está pensado para equipos de integración. Si solo necesitas saber si tu herramienta favorita está disponible, basta con ver la lista de acciones.

Acciones disponibles (60)

Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.

Add to datasetBRAINTRUST_MCP_ADD_TO_DATASETAcción

Add 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.

Parámetros de entrada

  • reasonstring

    A short explanation of why these dataset changes are useful.

  • telemetryobjectObligatorio
  • dataset_idstring

    The dataset ID. Provide either dataset_id or dataset_name.

  • project_idstringObligatorio

    Project ID whose logs to copy. The target dataset must be in this project.

  • log_row_idsstring[]Obligatorio

    The `id` values of the project log rows (spans) to copy, as returned by sql_query against project_logs. Up to 1000 per call; split larger copies across calls.

  • dataset_namestring

    The dataset name within the project. Provide either dataset_name or dataset_id.

  • create_if_missingboolean

    When targeting by name, create the dataset if it does not exist. Defaults to false.

Parámetros de salida

Sin parámetros.

Add to human review queueBRAINTRUST_MCP_ADD_TO_HUMAN_REVIEW_QUEUEAcción

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.

Parámetros de entrada

  • reasonstring
  • telemetryobjectObligatorio
  • dataset_idstringuuid

    Dataset containing the rows. Must belong to project_id. Cannot be combined with experiment_id.

  • project_idstringObligatoriouuid

    Project containing the rows

  • log_row_idsstring[]Obligatorio

    Row id values returned by sql_query against the selected source. For project logs and experiments, use shape='spans' and is_root=true; do not pass root_span_id. For datasets, pass dataset row IDs. Up to 100 per call.

  • experiment_idstringuuid

    Experiment containing the root spans. Must belong to project_id. Omit both experiment_id and dataset_id to target project logs.

  • assignee_user_idsstring[]

    Individual Braintrust user IDs from lookup_users. When provided, replaces the reviewers on every selected row; an empty array clears reviewers. Omit to preserve existing reviewers. Permission groups are not supported.

Parámetros de salida

Sin parámetros.

Create dashboard sqlBRAINTRUST_MCP_CREATE_DASHBOARD_SQLAcción

Create 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.

Parámetros de entrada

  • namestringObligatorio

    The name of the new dashboard

  • chartsarray

    Optional SQL chart configurations to save in the new dashboard, in order

  • telemetryobjectObligatorio
  • timeFrameany

    The optional page-level time range used to preview charts and save Monitoring views. Relative presets are shorthand strings of time before now and remain live when saved. Fixed timeframes are explicit from/to UTC timestamps. Omit this field to use the Monitoring default

  • project_idstringObligatoriouuid

    The project for the new dashboard

Parámetros de salida

Sin parámetros.

Create environment update alertBRAINTRUST_MCP_CREATE_ENVIRONMENT_UPDATE_ALERTAcción

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

Parámetros de entrada

  • namestringObligatorio

    The automation name.

  • configobjectObligatorio

    The complete environment-update alert configuration.

  • if_existsstringenum

    What to do when an automation with the same project and name exists: error, replace it, or ignore this write.

    errorignorereplace
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • descriptionstring

Parámetros de salida

Sin parámetros.

Create evaluatorBRAINTRUST_MCP_CREATE_EVALUATORAcción

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.

Parámetros de entrada

  • namestringObligatorio

    The display name.

  • slugstringObligatorio

    The unique slug within the project.

  • tagsstring[]
  • metadataobject
  • evaluatoranyObligatorio

    The LLM or code evaluator definition and its score or classification output contract.

  • if_existsstringenum

    What to do when the slug already exists: error, replace it with a new version, or ignore this write.

    errorignorereplace
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • descriptionstring

Parámetros de salida

Sin parámetros.

Create facetBRAINTRUST_MCP_CREATE_FACETAcción

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.

Parámetros de entrada

  • namestringObligatorio

    The display name.

  • slugstringObligatorio

    The unique slug within the project.

  • tagsstring[]
  • promptstringObligatorio

    The prompt to use for LLM extraction. The preprocessed text will be provided as context.

  • metadataobject
  • if_existsstringenum

    What to do when the slug already exists: error, replace it with a new version, or ignore this write.

    errorignorereplace
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • descriptionstring
  • preprocessorany

    The saved or global preprocessor to attach to the facet.

  • no_match_patternstring

    Regex pattern to identify outputs that do not match the facet. If the output matches, the facet will be saved as 'no_match'

Parámetros de salida

Sin parámetros.

Create human review scoreBRAINTRUST_MCP_CREATE_HUMAN_REVIEW_SCOREAcción

Create 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.

Parámetros de entrada

  • namestringObligatorio

    The name shown to reviewers

  • configobject

    Visibility by object type and reviewer user/group IDs

  • telemetryobjectObligatorio
  • categoriesobject[]

    Required for categorical scores: labels and their numeric values between 0 and 1

  • project_idstringObligatoriouuid

    Project ID.

  • score_typestringObligatorioenum

    The native human review input type

    categoricalsliderfree-form
  • descriptionstring

    Guidance for reviewers

Parámetros de salida

Sin parámetros.

Create log alertBRAINTRUST_MCP_CREATE_LOG_ALERTAcción

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.

Parámetros de entrada

  • namestringObligatorio

    The automation name.

  • configobjectObligatorio

    The complete log alert configuration.

  • if_existsstringenum

    What to do when an automation with the same project and name exists: error, replace it, or ignore this write.

    errorignorereplace
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • descriptionstring

Parámetros de salida

Sin parámetros.

Create preprocessorBRAINTRUST_MCP_CREATE_PREPROCESSORAcción

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.

Parámetros de entrada

  • codestringObligatorio

    The complete JavaScript preprocessor implementation, including its handler.

  • namestringObligatorio

    The display name.

  • slugstringObligatorio

    The unique slug within the project.

  • tagsstring[]
  • metadataobject
  • if_existsstringenum

    What to do when the slug already exists: error, replace it with a new version, or ignore this write.

    errorignorereplace
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • descriptionstring

Parámetros de salida

Sin parámetros.

Create promptBRAINTRUST_MCP_CREATE_PROMPTAcción

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.

Parámetros de entrada

  • namestringObligatorio

    The display name.

  • slugstringObligatorio

    The unique slug within the project.

  • tagsstring[]
  • modelstring
  • toolsobject[]

    Inline model tool definitions.

  • paramsobject
  • promptstring

    A completion-style prompt. Provide either prompt or messages, but not both.

  • messagesarray

    Chat prompt messages. Provide either messages or prompt, but not both.

  • metadataobject
  • if_existsstringenum

    What to do when the slug already exists: error, replace it with a new version, or ignore this write.

    errorignorereplace
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • descriptionstring
  • environmentsstring[]

    Environment slugs to associate with the prompt version.

  • tool_functionsarray

    Saved Braintrust functions to expose as tools to the prompt.

  • template_formatstringenum
    mustachenunjucksnone

Parámetros de salida

Sin parámetros.

Create protected field ruleBRAINTRUST_MCP_CREATE_PROTECTED_FIELD_RULEAcción

Add 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.

Parámetros de entrada

  • ruleanyObligatorio
  • telemetryobjectObligatorio
  • scope_object_idstringObligatoriouuid
  • scope_object_typestringObligatorioenum

    The object type that the ACL applies to

    organizationproject_group_projectsproject
  • restrict_object_typeany

    The object type that the ACL applies to

Parámetros de salida

Sin parámetros.

Create scheduled loop jobBRAINTRUST_MCP_CREATE_SCHEDULED_LOOP_JOBAcción

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.

Parámetros de entrada

  • namestringObligatorio

    The automation name.

  • configobjectObligatorio

    The complete scheduled Loop job configuration. It must include Loop work and must not include a threshold.

  • if_existsstringenum

    What to do when an automation with the same project and name exists: error, replace it, or ignore this write.

    errorignorereplace
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • descriptionstring

Parámetros de salida

Sin parámetros.

Create threshold alertBRAINTRUST_MCP_CREATE_THRESHOLD_ALERTAcción

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.

Parámetros de entrada

  • namestringObligatorio

    The automation name.

  • configobjectObligatorio

    The complete threshold alert configuration. It must include a threshold.

  • if_existsstringenum

    What to do when an automation with the same project and name exists: error, replace it, or ignore this write.

    errorignorereplace
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • descriptionstring

Parámetros de salida

Sin parámetros.

Delete protected field ruleBRAINTRUST_MCP_DELETE_PROTECTED_FIELD_RULEAcción

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).

Parámetros de entrada

  • idstringObligatoriouuid
  • telemetryobjectObligatorio
  • scope_object_idstringObligatoriouuid
  • scope_object_typestringObligatorioenum

    The object type that the ACL applies to

    organizationproject_group_projectsproject
  • restrict_object_typeany

    The object type that the ACL applies to

Parámetros de salida

Sin parámetros.

Edit dataset rowsBRAINTRUST_MCP_EDIT_DATASET_ROWSAcción

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.

Parámetros de entrada

  • reasonstring

    A short explanation of why these dataset changes are useful.

  • changesarrayObligatorio

    Insert, update, or delete operations to perform against the dataset. Inserts require at least one of input, expected, or metadata. Updates require at least one of input, expected, metadata, or tags.

  • telemetryobjectObligatorio
  • dataset_idstring

    The dataset ID. Provide either dataset_id or dataset_name.

  • project_idstring

    Project ID. Required when targeting by dataset name; optional when dataset_id is provided because the project is resolved from the dataset.

  • dataset_namestring

    The dataset name within the project. Provide either dataset_name or dataset_id.

  • create_if_missingboolean

    When targeting by name, create the dataset if it does not exist. Defaults to false.

Parámetros de salida

Sin parámetros.

Enable topics automationBRAINTRUST_MCP_ENABLE_TOPICS_AUTOMATIONAcción

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.

Parámetros de entrada

  • namestring

    Automation name. Defaults to Topics. Use a distinct name to create an additional Topics automation.

  • scopeany

    Execution scope for topic automation.

  • facetsarray

    Configured facets. New automations default to Task when omitted.

  • statusstringenum

    Whether the automation is active or paused.

    activepaused
  • telemetryobjectObligatorio
  • data_scopeany

    Optional data scope for topic automation.

  • project_idstring

    Required project ID.

  • btql_filterstring | null

    Optional BTQL filter applied before topic automation.

  • descriptionstring
  • facet_modelany

    Optional facet model override for topic automation

  • rerun_secondsany

    How often to recompute topic maps

  • sampling_ratenumber

    The sampling rate for topic automation

  • backfill_time_rangeany

    Topic window used for classification coverage and initial backfill.

Parámetros de salida

Sin parámetros.

Fail dashboard sectionBRAINTRUST_MCP_FAIL_DASHBOARD_SECTIONAcción

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

Parámetros de entrada

  • errorstring
  • view_idanyObligatorio
  • chart_idstring
  • group_idstringObligatorio
  • revisionstringObligatoriouuid
  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

Parámetros de salida

Sin parámetros.

Generate dashboard chart sqlBRAINTRUST_MCP_GENERATE_DASHBOARD_CHART_SQLAcción

Generate 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.

Parámetros de entrada

  • chartanyObligatorio

    Chart to preview

  • view_idstringuuid
  • telemetryobjectObligatorio
  • timeFrameany

    Preview time range

  • dataSourceobjectObligatorio

    Project logs

Parámetros de salida

Sin parámetros.

Generate permalinkBRAINTRUST_MCP_GENERATE_PERMALINKAcción

Generate a direct web link (permalink) to a Braintrust object for sharing or bookmarking. This tool creates URLs that link directly to projects, experiments, datasets, prompts, functions, or specific log entries in the Braintrust web application. Use this when users want to: - Share a link to an experiment or dataset with teammates - Create bookmarks to specific objects - Generate URLs for external documentation or reports - Navigate directly to specific log entries or traces The tool accepts either object_id directly, or project_name + object_name to resolve the object first. Supply org_name to disambiguate names across organizations. For project_logs, project_patterns, project_prompts, and project_functions, project_name alone is sufficient; object_id must be the containing project UUID. For project_logs, put the root span ID from the query's root_span_id field in row_id, not a child span's id. For patterns, prompts, and scorers, put the resource ID in row_id.

Parámetros de entrada

  • row_idstring

    Optional: the root_span_id for a log entry or trace, or the resource ID for a pattern, prompt, or scorer. Keep it separate from object_id. For logs, do not pass a child span's id.

  • org_namestring

    Organization name used to disambiguate project and object names.

  • object_idstring

    The UUID of the object (alternative to project_name + object_name). For project_logs, project_patterns, project_prompts, and project_functions, this must be the project UUID, not a project name or row ID.

  • telemetryobjectObligatorio
  • object_namestring

    The object name within the project (alternative to object_id). Not needed for project_logs, project_patterns, project_prompts, or project_functions.

  • object_typestringObligatorioenum

    The type of object to create a permalink for

    experimentdatasetprompt_sessionplayground_logsproject_logsproject_promptsproject_functionsproject_patternsaudit_logsagent_events
  • project_namestring

    The project name. Required with object_name for most types. For project_logs, project_patterns, project_prompts, and project_functions, this alone is sufficient.

Parámetros de salida

Sin parámetros.

Get monitoring viewBRAINTRUST_MCP_GET_MONITORING_VIEWAcción

Inspect a saved Monitoring view, including its options and ordered chart definitions. Pass view_id: overview to read the built-in Overview's current AI section targets, instructions, artifact paths and publication revision. The built-in Overview is read-only. Copy returned chart_id values unchanged.

Parámetros de entrada

  • view_idanyObligatorio

    The saved Monitoring view ID, or overview for the built-in Overview

  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

    The project containing the views

Parámetros de salida

Sin parámetros.

Get project settingsBRAINTRUST_MCP_GET_PROJECT_SETTINGSAcción

Get Braintrust project settings, including the configured field paths in settings.user_id_fields and settings.session_id_fields. Read these before grouping logs by user or session. If no session field is configured and each trace represents one session, group by root_span_id and state that assumption. The response also includes the effective default preprocessor, resolving an unset default to the built-in "thread" preprocessor.

Parámetros de entrada

  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

Parámetros de salida

Sin parámetros.

Get protected field policyBRAINTRUST_MCP_GET_PROTECTED_FIELD_POLICYAcción

Get the protected field policy and its rules for a scope. 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). Returns policy null when the scope has no policy.

Parámetros de entrada

  • telemetryobjectObligatorio
  • scope_object_idstringObligatoriouuid
  • scope_object_typestringObligatorioenum

    The object type that the ACL applies to

    organizationproject_group_projectsproject
  • restrict_object_typeany

    The object type that the ACL applies to

Parámetros de salida

Sin parámetros.

Infer schemaBRAINTRUST_MCP_INFER_SCHEMAAcción

Look up field paths and types when the query depends on an unknown field. Pass only the relevant fields, such as ["metadata", "output"]. Request sample values only when the query depends on a value you do not know. This searches indexed data, so newly logged fields can take about 20 seconds to appear.

Parámetros de entrada

  • limitinteger

    The maximum number of fields to return (defaults to 1000; cannot exceed 1000).

  • fieldsstring[]

    If specified, only infer schema for these top-level fields. Otherwise, infer schema for all fields.

  • telemetryobjectObligatorio
  • object_idsstring[]Obligatorio

    One or more object ids to analyze the schema for. For example, if you need to understand the schema of a specific experiment, just provide its object id.

  • object_typestringObligatorioenum
    project_logsexperimentdatasetprompt_sessionplayground_logsproject_promptsproject_functionsproject_patternsorg_promptsorg_functions
  • include_sample_valuesboolean

    Whether to include sample values for each field in the schema. This can help illustrate the type of data stored in each field.

Parámetros de salida

Sin parámetros.

List automationsBRAINTRUST_MCP_LIST_AUTOMATIONSAcción

List a project's automations, including online scoring rules, alerts, exports, retention policies, Topics automations, and other automation kinds. Returns complete configurations so an existing automation can be inspected before using a specialized update tool.

Parámetros de entrada

  • kindany

    Optional automation kind to filter by

  • namestring

    Optional exact automation name to filter by

  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

    The project containing the automations

  • automation_idstringuuid

    Optional exact automation ID to retrieve

Parámetros de salida

Sin parámetros.

List dataset custom viewsBRAINTRUST_MCP_LIST_DATASET_CUSTOM_VIEWSAcción

List up to 100 saved custom views for labeling dataset rows in a project, including each view's code and a link reviewers can open. Use this to find an existing view to update with save_dataset_custom_view, or to reuse one as a template: copy its code, adjust it, and save it on another dataset under a new slug.

Parámetros de entrada

  • telemetryobjectObligatorio
  • dataset_idstringuuid

    Only return views saved on this dataset. Omit to list views on every dataset in the project, for example to find a template to reuse.

  • project_idstringObligatoriouuid

    Project whose saved dataset custom views to list.

Parámetros de salida

Sin parámetros.

List monitoring viewsBRAINTRUST_MCP_LIST_MONITORING_VIEWSAcción

List the saved Monitoring views and chart IDs for a project so the user can choose a view or chart to inspect or edit.

Parámetros de entrada

  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

    The project containing the views

Parámetros de salida

Sin parámetros.

List recent objectsBRAINTRUST_MCP_LIST_RECENT_OBJECTSAcción

List recently created projects, experiments, datasets, prompts, or functions you have access to. You can use this to browse for objects and as a crude way of searching for objects (you will need to filter the results yourself). If an object you expect does not show up, then use the `starting_after` parameter to paginate through more results. If a user asks for something like "list my recent experiments", then you do not need to list through the set of projects. You can just provide the project name, and then list the experiments within that project. If you get an error, then perhaps the project name is incorrect, and you should fall back to listing projects first to find the one the user is referring to.

Parámetros de entrada

  • limitinteger

    The maximum number of objects to return. Defaults to 10 if not specified.

  • telemetryobjectObligatorio
  • object_typestringObligatorioenum

    The type of the object.

    organizationprojectexperimentdatasetpromptprompt_sessiongrouproleproject_groupproject_group_projectsai_secretorg_account
  • project_namestring

    Experiments, datasets, prompts, functions, prompt sessions live in projects, so you must specify a project_name to list those object types.

  • starting_afterstring

    For pagination, provide the last id from the previous result set to get the next page.

Parámetros de salida

Sin parámetros.

List scheduled loop job runsBRAINTRUST_MCP_LIST_SCHEDULED_LOOP_JOB_RUNSAcción

List a saved scheduled Loop job's run threads, newest first, with thread IDs, names, and Braintrust links. Requires project read access and returns only threads visible to the caller. Pass next_cursor as cursor to continue with the same project and automation. Continuous jobs can reuse a thread for multiple executions. Does not return execution status, transcript contents, or delivery output.

Parámetros de entrada

  • limitinteger
  • cursorstring

    The previous next_cursor

  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

    The project containing the automations

  • automation_idstringObligatoriouuid

    The saved Loop automation

Parámetros de salida

Sin parámetros.

List slack channelsBRAINTRUST_MCP_LIST_SLACK_CHANNELSAcción

List the Slack workspaces connected to a project's org and the public channels in a workspace, so a Slack alert action targets the channel the user named instead of a guessed ID. Call this before setting any Slack action's workspace_id and channel, passing the user's requested channel name as query. Match the requested channel to a returned channel and use its exact id; never invent or reuse a channel ID from context. If the org has multiple connected workspaces, workspace_id is null and channels is null until you call again with a specific workspace_id. If the channel isn't listed, ask the user for the channel ID rather than guessing.

Parámetros de entrada

  • querystring

    Optional case-insensitive substring to filter channels by name.

  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • workspace_idstring

    Optional Slack workspace ID to list channels for. Omit when the org has a single connected workspace to use it automatically.

Parámetros de salida

Sin parámetros.

Load braintrust skillBRAINTRUST_MCP_LOAD_BRAINTRUST_SKILLAcción

Load a guide when the request matches the workflow or SDK task described below. Use sql_query directly for ad hoc questions about Braintrust data. Available skills: - braintrust/automations-workflow: Set up, validate, and manage Braintrust alerts and scheduled Loop automations, including Patterns, threshold-triggered work, Slack or webhook delivery, and existing automation refinement. Use when a user asks to react to matching log or environment events, monitor a threshold, schedule recurring agent analysis, configure Patterns, or inspect an alert or Loop automation. - braintrust/bro: Restate the last message in plain human language, with no jargon. - braintrust/evaluator-workflow: Create, test, refine, deploy, rewind, and visualize Braintrust evaluators (scorers and classifiers) interactively. Use when a user asks to build or improve an evaluator, apply it to production logs with an online-scoring rule, backfill results, or review results. - braintrust/topics-workflow: Topics allow you to discover clusters from traces using a pipeline that involves preprocessing traces (converting raw trace data into a textual representation with JavaScript code), computing facets (using an LLM to convert the preprocessed data into 1-2 sentences), and clustering (using algorithms like HDBSCAN). These clusters are useful for discovering use cases, monitoring failures, and tracking these trends over time. Use when configuring, evaluating, or improving Topics, facets, preprocessors, or Topics automations. - braintrust/pattern-triage: Triage a specific saved pattern. Use when asked to check whether an existing pattern is still occurring, verify a fix, or or when investigating existing patterns. - agent-auto-improvement: Improve any Braintrust-instrumented agent by turning production traces into an offline eval loop: mine bad traces, build a failure taxonomy, capture cases in a remote Braintrust dataset, write scorers and an eval file, iterate on prompts/tools, and only then push online scorers. Use when the user wants to write evals for their agent, fix recurring production failures, or set up an auto-improvement loop for an LLM app. - pii-scrubbing: Wire up Braintrust span customizers to traverse span fields, then apply the requested scrubbing logic or ask what to scrub if unspecified. Includes LLM chat-message redaction examples and Python/TypeScript native and OpenTelemetry, Java, Go, and Ruby integrations. Loading a skill includes its supporting text files, labeled by relative path. Follow the returned guide for the matching task.

Parámetros de entrada

  • telemetryobjectObligatorio
  • skill_namestringObligatorioenum

    The exact Braintrust skill name to load.

    braintrust/automations-workflowbraintrust/brobraintrust/evaluator-workflowbraintrust/topics-workflowbraintrust/pattern-triageagent-auto-improvementpii-scrubbing

Parámetros de salida

Sin parámetros.

Lookup api keysBRAINTRUST_MCP_LOOKUP_API_KEYSAcción

Look up Braintrust API keys and service tokens by exact IDs, exact name, or an explicit request to list all visible keys. Provide exactly one of api_key_ids, name, or list_all: true. Results follow the existing API-key and service-token visibility rules; inaccessible IDs remain unresolved. Use this to resolve span_attributes.created_by_api_key_id, which may identify either a personal API key or a service token. When resolving query results, deduplicate and pass all IDs in one call rather than making one call per ID. If an exact name lookup returns multiple possible keys, ask the user to disambiguate before continuing.

Parámetros de entrada

  • namestring

    Exact API key or service token name. Multiple matches are returned for disambiguation.

  • list_allboolean

    Explicitly return every API key and service token visible in the organization.

  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

    Project ID used to authorize the lookup and determine the organization.

  • api_key_idsstring[]

    Braintrust API key or service token IDs to resolve. Deduplicate and pass every needed ID in one call instead of calling once per ID.

Parámetros de salida

  • project_idstringObligatoriouuid

    Project ID used to authorize the lookup and determine the organization.

  • api_keys_by_idobjectObligatorio
  • returned_countintegerObligatorio
  • organization_idstringObligatoriouuid
  • unresolved_api_key_idsstring[]Obligatorio
Lookup usersBRAINTRUST_MCP_LOOKUP_USERSAcción

Look up human Braintrust organization members by exact user IDs, partial name or email, or an explicit request to list all users. Provide exactly one of user_ids, search, or list_all: true. Use this to resolve span_attributes.created_by_user_id and Braintrust reviewer or assignee IDs. Do not interpret arbitrary metadata.user_id values as Braintrust organization users. When resolving query results, deduplicate and pass all user IDs in one call rather than making one call per ID. If a name search returns multiple possible users, ask the user to disambiguate before continuing.

Parámetros de entrada

  • searchstring

    Case-insensitive partial match across given name, family name, full name, and email. Multiple matches are returned for disambiguation.

  • list_allboolean

    Explicitly return every human user in the organization.

  • user_idsstring[]

    Braintrust organization user IDs to resolve. Deduplicate and pass every needed ID in one call instead of calling once per ID.

  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

    Project ID used to authorize the lookup and determine the organization.

Parámetros de salida

  • project_idstringObligatoriouuid

    Project ID used to authorize the lookup and determine the organization.

  • users_by_idobjectObligatorio
  • returned_countintegerObligatorio
  • organization_idstringObligatoriouuid
  • unresolved_user_idsstring[]Obligatorio
Measure pattern frequencyBRAINTRUST_MCP_MEASURE_PATTERN_FREQUENCYAcción

Measure distinct users, sessions, or traces matched by a pattern in one time window of up to 14 days. Uses users when the configured end-user field covers at least half the traces, sessions when session IDs cover at least half, and traces otherwise. In code mode, JSON.parse the returned text and retain the result with store() for the pattern write. Pass that snapshot unchanged to new_pattern or update_pattern as evidence.frequency.snapshot.

Parámetros de entrada

  • telemetryobjectObligatorio
  • project_idstringObligatorio

    The current project ID.

  • time_windowobject

    The exact window to measure, at most 14 days. Defaults to the last 14 days.

  • affected_filterstringObligatorio

    The affected_filter to save in evidence.frequency. No ANY_SPAN or aggregates.

  • population_filterstring

    The population_filter to save in evidence.frequency, if any.

Parámetros de salida

Sin parámetros.

Publish dashboard sectionBRAINTRUST_MCP_PUBLISH_DASHBOARD_SECTIONAcción

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.

Parámetros de entrada

  • reasonstring
  • view_idanyObligatorio
  • widgetsarrayObligatorio
  • chart_idstring
  • group_idstringObligatorio
  • revisionstringObligatoriouuid
  • telemetryobjectObligatorio
  • unchangedboolean
  • project_idstringObligatoriouuid

Parámetros de salida

Sin parámetros.

Read patterns rubricBRAINTRUST_MCP_READ_PATTERNS_RUBRICAcción

Read the project's Patterns rubric, which defines how to assign pattern severity and categories.

Parámetros de entrada

  • telemetryobjectObligatorio
  • project_idstringObligatorio

    The current project ID.

Parámetros de salida

Sin parámetros.

Resolve attachmentsBRAINTRUST_MCP_RESOLVE_ATTACHMENTSAcción

Resolve one attachment reference or a batch from sql_query results into temporary download URLs. Provide the owning org_id and complete attachment references. Results preserve input order and include the original reference, upload status, and either a download URL or an individual error. URLs expire after five minutes; call again for fresh URLs. This tool only reads metadata and never downloads attachment contents. Treat URLs as sensitive and only download attachments whose upload status is done.

Parámetros de entrada

  • org_idstringObligatoriouuid

    Organization that owns the attachments.

  • telemetryobjectObligatorio
  • attachmentsanyObligatorio

    One attachment reference or up to 100 references from query results. Pass each complete reference, including type, filename, content_type, and key or url.

Parámetros de salida

  • resultsarrayObligatorio
Resolve objectBRAINTRUST_MCP_RESOLVE_OBJECTAcción

Convert names to IDs (or vice versa) and parse Braintrust URLs. App URLs retain their organization scope. Pattern, prompt, and scorer links return the containing project as object_id and the resource as row_id; query that project collection with an id filter. Read docs://url-formats for supported URL patterns.

Parámetros de entrada

  • urlstring

    A Braintrust URL to parse. Supports both app links (/app/{org}/p/{project}/{type}/{name}) and legacy object URLs (/app/object?object_type=...&object_id=...). The tool will extract object_type, object_id, project_name, object_name, and root_span_id (from the 'r=' parameter) as applicable.

  • org_namestring

    Organization name used to disambiguate project and object names. Extracted automatically from app URLs.

  • object_idstring

    The id of the object. If you specify this, you do not need to specify a project_name or object_name.

  • telemetryobjectObligatorio
  • object_namestring

    The name of the object. Specify this together with a project_name to look for an object within a specific project and return its id.

  • object_typestringenum

    The type of the object. If you specify project_logs, then you do not need to specify an object_name, as the tool will return the logs for the specified project. If you specify a project_name with object_type='logs', the object_id will be the project's id.

    experimentdatasetprompt_sessionplayground_logsproject_logsproject_promptsproject_functionsproject_patternsaudit_logsagent_eventsorg_promptsorg_functions+2
  • project_namestring

    The name of the project. If specified together with an object_name, the resolver will look for an object with that name within the specified project.

Parámetros de salida

Sin parámetros.

Rewind topics automationBRAINTRUST_MCP_REWIND_TOPICS_AUTOMATIONAcción

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.

Parámetros de entrada

  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • start_timestringdate-time

    For rewind, the inclusive ISO-8601 timestamp to reprocess from.

  • automation_idstring

    The target Topics automation. May be omitted when the project has exactly one Topics automation.

  • rewind_window_secondsinteger

    For rewind, reprocess this many seconds of recent history.

Parámetros de salida

Sin parámetros.

Run evalBRAINTRUST_MCP_RUN_EVALAcción

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.

Parámetros de entrada

  • dataanyObligatorio

    The dataset to use

  • tagsstring[]

    Optional tags that will be added to the experiment.

  • taskanyObligatorio

    The Braintrust functional task. Use {function_id, version?} for a saved function, {project_name, slug, version?} for a saved project function, or an inline function descriptor supplied by the active workflow skill.

  • scoresarray

    Zero or more Braintrust scorer function descriptors. Use saved function references or controlled inline scorer descriptors supplied by the active workflow skill.

  • strictboolean | null

    If true, throw an error if one of the variables in the prompt is not present in the input

  • timeoutnumber | null

    The maximum duration, in milliseconds, to run the evaluation. There is no timeout by default.

  • metadataobject

    Optional experiment-level metadata to store about the evaluation. You can later use this to slice & dice across experiments.

  • telemetryobjectObligatorio
  • parametersobject

    Values for any parameters used in the eval

  • project_idstring

    Required project ID where the experiment will be created.

  • trial_countnumber | null

    The number of times to run the evaluator per input. This is useful for evaluating applications that have non-deterministic behavior and gives you both a stronger aggregate measure and a sense of the variance in the results.

  • extra_messagesstring

    A template path of extra messages to append to the conversion. These messages will be appended to the end of the conversation, after the last message.

  • experiment_namestring

    An optional name for the experiment created by this eval. If it conflicts with an existing experiment, it will be suffixed with a unique identifier.

  • max_concurrencynumber | null

    The maximum number of tasks/scorers that will be run concurrently. Defaults to 10. If null is provided, no max concurrency will be used.

  • base_experiment_idstring | null

    An optional experiment id to use as a base. If specified, the new experiment will be summarized and compared to this experiment.

  • base_experiment_namestring | null

    An optional experiment name to use as a base. If specified, the new experiment will be summarized and compared to this experiment.

Parámetros de salida

Sin parámetros.

Run scheduled loop jobBRAINTRUST_MCP_RUN_SCHEDULED_LOOP_JOBAcción

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.

Parámetros de entrada

  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

    The project containing the automations

  • automation_idstringObligatoriouuid

    The saved Loop automation to run

Parámetros de salida

Sin parámetros.

Save dataset custom viewBRAINTRUST_MCP_SAVE_DATASET_CUSTOM_VIEWAcción

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.

Parámetros de entrada

  • codestringObligatorio

    Complete JSX source for the view. Define a React function component that receives the dataset row props `id`, `input`, `expected`, `metadata`, `tags`, and `update`, and end with `module.exports = ComponentName;`. `input` and `expected` may be JSON strings or objects. Call `update({ metadata, input, expected, tags })` to write labels back to the row. `import` and `require` statements are stripped, so use only React and Tailwind classes.

  • namestringObligatorio

    The view name shown to reviewers.

  • slugstringObligatorio

    The unique slug within the project. Reuse an existing view's slug with if_exists replace to update that view.

  • if_existsstringenum

    What to do when the slug already exists: error, replace it with a new version, or ignore this write. A slug can only be replaced by a view on the same dataset.

    errorignorereplace
  • telemetryobjectObligatorio
  • dataset_idstringObligatoriouuid

    Dataset that reviewers will label with this view.

  • descriptionstring

Parámetros de salida

Sin parámetros.

Search docsBRAINTRUST_MCP_SEARCH_DOCSAcción

Search Braintrust documentation to find relevant information and guidance. IMPORTANT: For SDK installation/setup tasks, do not use this tool. Instead, read the mcp resource docs://sdk-install This tool searches through the official Braintrust documentation using semantic search to find the most relevant content for your query. Use this tool to: - Learn more about what experiments, datasets, prompts, playgrounds, and logs are, and how to use them in the API or SDK. - Understand how to write evals and create scorers - Find sample code and guidance on how to add tracing for custom code as well as popular frameworks like the Vercel AI SDK. - Find code examples that are relevant to your use cases. What it returns: - Multiple documentation snippets ranked by relevance - Each snippet includes the content, headers hierarchy, and path - Content is Markdown formatted Example queries: - "How do I create an experiment?" - "Setting up scorers" - "Using metadata fields" - "Prompt playground features"

Parámetros de entrada

  • querystringObligatorio

    A search string to find relevant documentation. The string will be embedded and then used to search for relevant snippets in a vector database.

  • top_kinteger

    The number of top relevant document snippets to return. Higher values return more results but may include less relevant snippets.

  • telemetryobjectObligatorio

Parámetros de salida

Sin parámetros.

Search patternsBRAINTRUST_MCP_SEARCH_PATTERNSAcción

Search existing patterns in a project by text, semantic similarity, ID, status, or quality. limit must be 1–100. Omit query for a listing. Ordinary listings and text searches use stable insertion order, newest first; while has_more is true, pass the returned cursor with the same project and filters to continue. Cursors do not support similar_to. Use similar_to with one or more existing pattern IDs or unreported pattern drafts to catch duplicates with different wording.

Parámetros de entrada

  • limitinteger

    Maximum patterns to return (1–100), per target for semantic searches. For ordinary listings or text searches, pass the returned cursor to retrieve the next page when has_more is true.

  • querystring

    Full-text search across pattern names, descriptions, recommended next steps, and feedback. Omit for a listing; blank text is treated as omitted. Use similar_to instead when wording may differ.

  • cursorstring

    The opaque BTQL cursor returned by the previous page. Keep the same project and filters. A full final page may require an empty follow-up page. Not supported with similar_to.

  • statusstringenum
    activeinvestigatinginactiveduplicate
  • includestring[]

    counts: saved affected, comparable-population, and total counts with their unit and time window; never remeasured. evidence: saved filters, monitors, and references. all: full Pattern details and charts. Omit for summaries.

  • qualitystringenum
    usefulnoise
  • telemetryobjectObligatorio
  • pattern_idstringuuid
  • project_idstringObligatorio

    The current project ID.

  • return_urlboolean

    Store the complete search response and return a temporary download URL instead of inline JSON.

  • similar_toany

    One pattern or an array of patterns to compare semantically against existing patterns. Use pattern_id for a reported pattern, or name and description for an unreported pattern. Array results are grouped by target.

  • exclude_pattern_idstringuuid

    A pattern ID to omit from the results.

Parámetros de salida

Sin parámetros.

Send feedbackBRAINTRUST_MCP_SEND_FEEDBACKAcción

Send 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.

Parámetros de entrada

  • contextobject

    Optional structured context for debugging the problem. Put the affected tool's name in tool. Other keys can hold parameter names, the error message, and Braintrust object IDs. 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.

  • feedbackstringObligatorio

    What you were trying to do, what happened, and what you expected. 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.

  • telemetryobjectObligatorio

Parámetros de salida

Sin parámetros.

Set automation statusBRAINTRUST_MCP_SET_AUTOMATION_STATUSAcción

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.

Parámetros de entrada

  • statusstringObligatorioenum

    The desired lifecycle status. Missing stored status is treated as active.

    activepaused
  • telemetryobjectObligatorio
  • project_idstringObligatoriouuid

    The project containing the automations

  • automation_idstringObligatoriouuid

    The automation to update

Parámetros de salida

Sin parámetros.

Set project default preprocessorBRAINTRUST_MCP_SET_PROJECT_DEFAULT_PREPROCESSORAcción

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.

Parámetros de entrada

  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • preprocessoranyObligatorio

    The saved or global preprocessor to use by default, or null to restore the built-in default.

Parámetros de salida

Sin parámetros.

Set project session id fieldBRAINTRUST_MCP_SET_PROJECT_SESSION_ID_FIELDAcción

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.

Parámetros de entrada

  • fieldanyObligatorio

    BTQL identifier linking turns of a session or conversation across traces, for example metadata.conversation_id or span_attributes."session.id". Use null with only_if_unset false to clear it. Never configure a user, request, trace, organization, or service account identifier as a session.

  • telemetryobjectObligatorio
  • project_idstringObligatorio

    Required project ID.

  • only_if_unsetboolean

    Initialize only if no session ID field is configured. Leave true for automatic discovery; an explicit user override can use false and requires project update access.

Parámetros de salida

Sin parámetros.

Set project user id fieldBRAINTRUST_MCP_SET_PROJECT_USER_ID_FIELDAcción

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.

Parámetros de entrada

  • fieldanyObligatorio

    BTQL identifier for the end-user field, for example metadata.customer_id or span_attributes."enduser.id". Use null with only_if_unset false to clear it. Never configure a session, request, trace, organization, or service account identifier as an end user.

  • telemetryobjectObligatorio
  • project_idstringObligatorio

    Required project ID.

  • only_if_unsetboolean

    Initialize only if no user ID field is configured. Leave true for automatic discovery; an explicit user override can use false and requires project update access.

Parámetros de salida

Sin parámetros.

Set topics automationBRAINTRUST_MCP_SET_TOPICS_AUTOMATIONAcción

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.

Parámetros de entrada

  • namestring
  • scopeany

    Execution scope for topic automation.

  • facetsarray

    Facets to add. Each new facet gets a new topic map with no topics until it is generated. Facets that are already configured are left unchanged. A facet that is configured at a different version is rejected unless that version is removed in the same call. To give a configured facet a new topic map, pass it in both facets and remove_facets.

  • statusstringenum

    Whether the automation is active or paused.

    activepaused
  • telemetryobjectObligatorio
  • facet_modestringenum

    Deprecated. Facets are always added. "replace" is rejected; remove facets and topic maps with remove_facets and remove_topic_map_ids.

    addreplace
  • project_idstring

    Required project ID.

  • btql_filterstring | null

    Optional BTQL filter applied before topic automation.

  • descriptionstring
  • facet_modelany

    Optional facet model override for topic automation

  • automation_idstring

    The target Topics automation. May be omitted when the project has exactly one Topics automation.

  • remove_facetsarray

    Configured facets to remove, together with the topic maps generated from them. Removed topic maps' topics disappear from the Topics page. Topic maps whose facet can't be determined are not removed. The result lists them, with any other remaining maps whose facet is no longer configured, in topic_map_changes.unmatched; remove them with remove_topic_map_ids.

  • rerun_secondsany

    How often to recompute topic maps

  • sampling_ratenumber

    The sampling rate for topic automation

  • backfill_time_rangeany

    Topic window used for classification coverage and initial backfill.

  • remove_topic_map_idsstring[]

    Topic maps to remove from the automation. Their topics disappear from the Topics page.

Parámetros de salida

Sin parámetros.

Sql queryBRAINTRUST_MCP_SQL_QUERYAcción

Run one read-only Braintrust SQL (BTQL) query. Use it directly when the source and fields are known. Pass one complete SELECT in query. Use FROM project_logs('<project_id>'), experiment('<id>'), or dataset('<id>'). Log rows are spans by default. Scope log queries by created (e.g. created >= now() - interval 1 day) or by known IDs. Use is_root = true for root spans and span_attributes.type = 'llm' for model calls. Model usage fields include metrics.prompt_tokens, metrics.completion_tokens, and metrics.estimated_cost. Use infer_schema with specific fields when you need to discover a custom field. Do the filtering, math, grouping, and ranking in SQL. Select only the fields needed for the answer. Set an explicit LIMIT of at most 1000 rows. The default is 10. - Users and sessions: use get_project_settings to find configured identifier fields before grouping project logs by user or session. - Arrays: expand with UNPIVOT (item FOR _ IN (array_expr)). Use json_extract_string(item, '$.key') to read a property from mixed JSON elements. Use a bounded source subquery for large payload fields. - Time buckets: select date_trunc('day', created) AS day and COUNT(*) with GROUP BY day. Use one query for the whole time range. - Percentiles: percentile(value, p) returns an estimate. Pass p between 0 and 1, for example percentile(metrics.end - metrics.start, 0.95) for p95 latency. On data planes with exact percentile support, percentile_disc(value, p) returns the exact nearest rank, and PERCENTILE_CONT(p) WITHIN GROUP (ORDER BY value) interpolates between ranks. - Per-trace totals: GROUP BY root_span_id, then filter totals with HAVING SUM(metrics.estimated_cost) > <amount>. Select root_span_id directly for matching trace IDs. - Per-group ranking: aggregate in subqueries, then rank the complete grouped rows client-side if you need the row associated with each group's maximum. BTQL has no window functions, CTEs, or JOINs. - Rank root spans by elapsed time: on is_root = true, select root_span_id and MAX(metrics.end) - MIN(metrics.start) AS duration, then GROUP BY root_span_id ORDER BY duration DESC LIMIT <n>. This sorts grouped results in SQL. - Cross-span filters: use shape => 'traces' with WHERE ANY_SPAN(<span predicate>) to keep all spans of matching traces available for aggregation. Use SELECT DISTINCT root_span_id to list matching traces and ANY_SPAN(search('keyword')) for full-text search across a trace. To retrieve individual spans, query the matching root_span_id values. Use the lint message to adjust blocked queries. If sort pushdown fails, use ORDER BY created for chronological samples or sort the complete result client-side. To link to a trace, pass root_span_id as row_id to generate_permalink.

Parámetros de entrada

  • querystringObligatorio

    One complete SQL query, including SELECT and FROM. FROM names the object type and its ids, such as `FROM project_logs('<project_id>')`, and takes an optional shape argument, such as `FROM project_logs('<project_id>', shape => 'traces')`. Select explicit lightweight fields for discovery, then fetch large payload fields only after narrowing the candidate set. Prefer selective, indexable filters such as a time range or exact identifier. Sort by raw indexed fields with a small LIMIT. A query without LIMIT returns at most 10 rows.

  • telemetryobjectObligatorio
  • return_urlboolean

    Return a signed URL instead of inline rows. This changes delivery only and does not make an unbounded or expensive query safe. For an untruncated download, also set preview_length to -1.

  • explanationstring

    Optional user-facing explanation of what the query is checking.

  • preview_lengthinteger

    Maximum characters per field before truncation. Defaults to 1024. Set to -1 to disable truncation only when an already selective and bounded query requires complete values.

  • force_ignore_linterboolean

    Bypass SQL lint failures. First rewrite the query according to the lint feedback. Use true only when the query is already selective and bounded and the remaining warning is unavoidable for the user's request.

Parámetros de salida

Sin parámetros.

Summarize experimentBRAINTRUST_MCP_SUMMARIZE_EXPERIMENTAcción

Get aggregated performance metrics for an experiment, optionally compared to a baseline. Read docs://experiments for background. For row-level data, use sql_query.

Parámetros de entrada

  • telemetryobjectObligatorio
  • experiment_idstringObligatorio

    The id of the experiment to summarize.

  • comparison_experiment_idstring

    Optional: the id of an experiment to compare against. If provided, the summary will include comparisons to this baseline.

Parámetros de salida

Sin parámetros.

Test evaluatorBRAINTRUST_MCP_TEST_EVALUATORAcción

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.

Parámetros de entrada

  • inputsarrayObligatorio

    Representative inputs to evaluate. Each item may be an inline evaluator row or a canonical span, trace, or group reference.

  • functionanyObligatorio

    The saved, global, or inline evaluator to invoke. Set inline_evaluator to test a complete evaluator definition without saving it first.

  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

Parámetros de salida

Sin parámetros.

Test facet on traceBRAINTRUST_MCP_TEST_FACET_ON_TRACEAcción

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.

Parámetros de entrada

  • namestringObligatorio

    The facet name for this test run.

  • inputsarrayObligatorio

    One to ten canonical span, trace, or group input references.

  • promptstringObligatorio

    The prompt to use for LLM extraction. The preprocessed text will be provided as context.

  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • preprocessorany
  • no_match_patternstring

    Regex pattern to identify outputs that do not match the facet. If the output matches, the facet will be saved as 'no_match'

Parámetros de salida

Sin parámetros.

Test preprocessor on traceBRAINTRUST_MCP_TEST_PREPROCESSOR_ON_TRACEAcción

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.

Parámetros de entrada

  • inputsarrayObligatorio

    One to 50 canonical span, trace, or group input references.

  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • preprocessoranyObligatorio

Parámetros de salida

Sin parámetros.

Unpin topic mapsBRAINTRUST_MCP_UNPIN_TOPIC_MAPSAcción

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.

Parámetros de entrada

  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • automation_idstring

    The target Topics automation. May be omitted when the project has exactly one Topics automation.

  • topic_map_idsstring[]

    Topic maps to unpin. Each must be configured on this automation; ones that are already unpinned are reported in already_unpinned. Omit to unpin every pinned topic map.

Parámetros de salida

Sin parámetros.

Update dashboard sqlBRAINTRUST_MCP_UPDATE_DASHBOARD_SQLAcción

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.

Parámetros de entrada

  • chartany

    Required for insert or update. Pass chartConfig unchanged from generate_dashboard_chart_sql

  • view_idstringObligatoriouuid

    The saved Monitoring view to update

  • chart_idstring

    Required for update or remove. Copy chart_id unchanged from get_monitoring_view

  • operationstringenum

    A single chart edit. Omit when passing the operations array

    insertupdateremove
  • telemetryobjectObligatorio
  • operationsarray

    One or more chart edits to apply in order with a single save. Omit the top-level operation, chart_id, and chart fields when using this array

  • project_idstringObligatoriouuid

    The project containing the views

Parámetros de salida

Sin parámetros.

Update debug reportBRAINTRUST_MCP_UPDATE_DEBUG_REPORTAcción

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.

Parámetros de entrada

  • reportobjectObligatorio
  • row_idstringObligatorio
  • span_idstringObligatorio
  • object_idstringObligatorio
  • telemetryobjectObligatorio
  • object_typestringObligatorioenum
    project_logsexperimentplayground_logs
  • root_span_idstringObligatorio
  • debugger_spanstring

    Opaque Braintrust span reference to update.

Parámetros de salida

  • updatedbooleanObligatorio
Update online scoring ruleBRAINTRUST_MCP_UPDATE_ONLINE_SCORING_RULEAcción

Save or rewind an online-scoring rule that runs saved evaluator functions. This tool is the approval surface for both mutations: state the proposed parameters, then call it without asking the user to type a separate confirmation. For save, provide function_ids, the rule scope, filters, and sampling rate. New rules default to paused; pass status active only when the user has authorized processing new traffic. Existing rules preserve their status when omitted. A group scope requires group_by and placement and accepts optional interval_seconds and max_traces. For rewind, require an existing active automation_id and choose start_time from the user's requested window. Activate a paused rule with set_automation_status before rewinding it. Do not repeatedly resubmit it to poll for progress.

Parámetros de entrada

  • namestring

    Name of the project score

  • scopeany

    Required for save. The span, trace, or group unit to evaluate.

  • statusstringenum

    Lifecycle status for save. New rules default to paused; existing rules preserve their current status when omitted.

    activepaused
  • operationstringObligatorioenum

    Save a rule definition or rewind an existing rule.

    saverewind
  • telemetryobjectObligatorio
  • project_idstring

    Required project ID.

  • start_timestringdate-time

    Required for rewind. Inclusive ISO-8601 timestamp to reprocess from.

  • btql_filterstring

    Filter logs using BTQL

  • descriptionstring

    Textual description of the project score

  • function_idsstring[]

    Required for save. The saved evaluator function IDs to run.

  • skip_loggingboolean

    Whether to skip adding scorer spans when computing scores

  • automation_idstring

    Required for rewind. For save, set this to update an existing rule or omit it to create one.

  • sampling_ratenumber

    The sampling rate for online scoring

  • apply_to_root_spanboolean

    Whether to trigger online scoring on the root span of each trace. Only applies when scope is 'span' or unset.

  • apply_to_span_namesstring[]

    Trigger online scoring on any spans with a name in this list. Only applies when scope is 'span' or unset.

Parámetros de salida

Sin parámetros.

Update patternBRAINTRUST_MCP_UPDATE_PATTERNAcción

Update an existing project pattern's content, source review, status, quality, or feedback, and optionally attach quoted evidence to matching traces. Closing an active pattern saves the reason as feedback. Before using this tool, use search_patterns to inspect the current pattern. Backfill a missing source_review after triage; omit it to preserve the saved review. When revising evidence, include Frequency (evidence.frequency) whenever measurable; other monitors are optional additions. Reactivated Patterns automatically notify the configured project Pattern alert destinations; do not send a separate alert.

Parámetros de entrada

  • namestring
  • reasonstringObligatorio

    Briefly explain the change. Status-change reasons appear in Activity.

  • statusstringenum
    activeinvestigatinginactiveduplicate
  • commentstring

    Post a separate discussion note to the pattern's Activity timeline, like Leave a comment in the UI. Use for notes and links that are independent of a status change. Put the explanation for a status change in reason, not comment; do not duplicate it here. Can be used without changing pattern fields.

  • qualityany

    Whether the pattern was useful or noise. Omit to preserve the existing quality or pass null to clear it.

  • categorystring[]

    Categories for the kind of finding, named exactly as in the Patterns rubric from read_patterns_rubric, which says how many to assign.

  • evidenceobject

    Evidence fields to update on the pattern.

  • feedbackany

    Feedback about the pattern's usefulness or classification. This does not post to the Activity timeline; use comment for triage notes and links. Omit or pass null to preserve existing feedback.

  • severitystringenum

    User-impact severity; the pattern analysis skill defines each level.

    highmediumlowinformational
  • last_seenstring

    ISO 8601 `created` timestamp of the most recent trace observed exhibiting the pattern. Use the trace's own timestamp, not the analysis time or window end. Must not be in the future.

  • telemetryobjectObligatorio
  • first_seenstring

    ISO 8601 `created` timestamp of the earliest matching trace observed so far. Use the trace's own timestamp, not the analysis time or window start. Only moves earlier when an older match is found. Must not be in the future.

  • pattern_idstringObligatoriouuid

    The pattern ID to update.

  • project_idstringObligatorio

    The current project ID.

  • descriptionstring
  • duplicate_ofany

    Canonical pattern ID in this project. Required when closing as duplicate. To undo duplicate closure, explicitly clear it with null and set active or inactive.

  • source_reviewobject

    Source review outcome, with findings or the source access limitation.

  • trace_evidenceobject[]

    All examples. Put up to three distinct, high-impact examples first, ordered by prevalence when comparable; append the rest. Up to 20 trace IDs retain this order.

  • question_preprocessorany

    The saved preprocessor the sample for evidence.frequency.question was rendered with. Leave it out to keep the one saved on the pattern. Pass null when the question is now answered with the project default.

  • recommended_next_stepstring

Parámetros de salida

Sin parámetros.

Update protected field ruleBRAINTRUST_MCP_UPDATE_PROTECTED_FIELD_RULEAcción

Update fields of an existing protected field rule by id. Omitted fields are unchanged; set enabled to false to pause a rule. 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.

Parámetros de entrada

  • idstringObligatoriouuid
  • namestring
  • stagestringenum
    ingestread
  • actionstringenum
    redactprotecthide
  • enabledboolean
  • telemetryobjectObligatorio
  • thresholdnumber
  • allow_whenany
  • field_pathsarray[]
  • entity_typesany
  • protect_whenstring
  • allowed_valuesstring[]
  • scope_object_idstringObligatoriouuid
  • entity_operatorsobject
  • scope_object_typestringObligatorioenum

    The object type that the ACL applies to

    organizationproject_group_projectsproject
  • expression_versionnumber
  • excluded_field_pathsarray
  • restrict_object_typeany

    The object type that the ACL applies to

Parámetros de salida

Sin parámetros.