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.

  • Generate permalink

    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.

  • Get monitoring view

    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.

  • Get project settings

    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.

  • Get protected field policy

    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.

  • Infer schema

    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.

  • List automations

    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.

  • List dataset custom views

    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.

  • List monitoring views

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

  • List recent objects

    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.

  • List scheduled loop job runs

    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.

  • List slack channels

    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.

  • Load braintrust skill

    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.

  • Lookup api keys

    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.

  • Lookup users

    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.

  • Measure pattern frequency

    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.

  • Read patterns rubric

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

  • Resolve attachments

    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.

  • Resolve object

    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.

  • Search docs

    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"

  • Search patterns

    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.

Page 1 / 2Next