From 565ece6a00d15f40880645ad78156386e944f503 Mon Sep 17 00:00:00 2001 From: edenh Date: Mon, 15 Dec 2025 14:04:01 -0700 Subject: [PATCH] mcp and project descriptions --- openapi/spec.json | 1467 ++++++++++++++++++++++++++++++++++++++++++++- openapi/spec.yaml | 1024 ++++++++++++++++++++++++++++++- 2 files changed, 2439 insertions(+), 52 deletions(-) diff --git a/openapi/spec.json b/openapi/spec.json index 2de3ab5..eb83eb0 100644 --- a/openapi/spec.json +++ b/openapi/spec.json @@ -129,6 +129,11 @@ "format": "uuid", "description": "EnvVar id" }, + "McpServerIdParam": { + "type": "string", + "format": "uuid", + "description": "McpServer id" + }, "ProjectIdQuery": { "type": "string", "format": "uuid", @@ -202,6 +207,10 @@ "type": "string", "description": "Name of the env_var to search for" }, + "McpServerName": { + "type": "string", + "description": "Name of the mcp_server to search for" + }, "OrgName": { "type": "string", "description": "Filter search results to within a particular organization" @@ -554,6 +563,11 @@ ] }, "description": "The remote eval sources to use for the project" + }, + "disable_realtime_queries": { + "type": "boolean", + "nullable": true, + "description": "If true, disable real-time queries for this project. This can improve query performance for high-volume logs." } } }, @@ -574,6 +588,11 @@ "type": "string", "description": "Name of the project" }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the project" + }, "created": { "type": "string", "nullable": true, @@ -610,6 +629,11 @@ "minLength": 1, "description": "Name of the project" }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the project" + }, "org_name": { "type": "string", "nullable": true, @@ -628,6 +652,10 @@ "nullable": true, "description": "Name of the project" }, + "description": { + "type": "string", + "nullable": true + }, "settings": { "allOf": [ { @@ -1120,6 +1148,26 @@ }, "origin": { "$ref": "#/components/schemas/ObjectReferenceNullish" + }, + "comments": { + "type": "array", + "nullable": true, + "items": { + "nullable": true + }, + "description": "Optional list of comments attached to this event" + }, + "audit_data": { + "type": "array", + "nullable": true, + "items": { + "nullable": true + }, + "description": "Optional list of audit entries attached to this event" + }, + "_async_scoring_state": { + "nullable": true, + "description": "The async scoring state for this event" } }, "required": [ @@ -1929,6 +1977,22 @@ }, "origin": { "$ref": "#/components/schemas/ObjectReferenceNullish" + }, + "comments": { + "type": "array", + "nullable": true, + "items": { + "nullable": true + }, + "description": "Optional list of comments attached to this event" + }, + "audit_data": { + "type": "array", + "nullable": true, + "items": { + "nullable": true + }, + "description": "Optional list of audit entries attached to this event" } }, "required": [ @@ -2460,6 +2524,22 @@ }, "origin": { "$ref": "#/components/schemas/ObjectReferenceNullish" + }, + "comments": { + "type": "array", + "nullable": true, + "items": { + "nullable": true + }, + "description": "Optional list of comments attached to this event" + }, + "audit_data": { + "type": "array", + "nullable": true, + "items": { + "nullable": true + }, + "description": "Optional list of audit entries attached to this event" } }, "required": [ @@ -2716,6 +2796,40 @@ ], "title": "image_url" }, + "ChatCompletionContentPartFileFile": { + "type": "object", + "properties": { + "file_data": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "file_id": { + "type": "string", + "title": "The ID of an uploaded file to use as input." + } + } + }, + "ChatCompletionContentPartFileWithTitle": { + "type": "object", + "properties": { + "file": { + "$ref": "#/components/schemas/ChatCompletionContentPartFileFile" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + } + }, + "required": [ + "file", + "type" + ], + "title": "file" + }, "ChatCompletionContentPart": { "anyOf": [ { @@ -2723,6 +2837,9 @@ }, { "$ref": "#/components/schemas/ChatCompletionContentPartImageWithTitle" + }, + { + "$ref": "#/components/schemas/ChatCompletionContentPartFileWithTitle" } ], "title": "chat_completion_content_part" @@ -3175,6 +3292,12 @@ "use_cache": { "type": "boolean" }, + "reasoning_enabled": { + "type": "boolean" + }, + "reasoning_budget": { + "type": "number" + }, "temperature": { "type": "number" }, @@ -3291,6 +3414,7 @@ "reasoning_effort": { "type": "string", "enum": [ + "none", "minimal", "low", "medium", @@ -3320,6 +3444,12 @@ "use_cache": { "type": "boolean" }, + "reasoning_enabled": { + "type": "boolean" + }, + "reasoning_budget": { + "type": "number" + }, "max_tokens": { "type": "number" }, @@ -3338,12 +3468,6 @@ "type": "string" } }, - "reasoning_enabled": { - "type": "boolean" - }, - "reasoning_budget": { - "type": "number" - }, "max_tokens_to_sample": { "type": "number", "description": "This is a legacy parameter that should not be used." @@ -3367,6 +3491,12 @@ "use_cache": { "type": "boolean" }, + "reasoning_enabled": { + "type": "boolean" + }, + "reasoning_budget": { + "type": "number" + }, "temperature": { "type": "number" }, @@ -3394,6 +3524,12 @@ "use_cache": { "type": "boolean" }, + "reasoning_enabled": { + "type": "boolean" + }, + "reasoning_budget": { + "type": "number" + }, "temperature": { "type": "number" }, @@ -3414,6 +3550,12 @@ "properties": { "use_cache": { "type": "boolean" + }, + "reasoning_enabled": { + "type": "boolean" + }, + "reasoning_budget": { + "type": "number" } }, "additionalProperties": { @@ -3531,6 +3673,75 @@ "$ref": "#/components/schemas/SavedFunctionId" } }, + "mcp": { + "type": "object", + "nullable": true, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "id" + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "is_disabled": { + "type": "boolean" + }, + "enabled_tools": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "If omitted, all tools are enabled" + } + }, + "required": [ + "type", + "id" + ], + "title": "MCP server id. This is used for project-level MCP server definitions." + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ] + }, + "url": { + "type": "string" + }, + "is_disabled": { + "type": "boolean" + }, + "enabled_tools": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "If omitted, all tools are enabled" + } + }, + "required": [ + "type", + "url" + ], + "title": "MCP server url. This is used for inline definitions of MCP servers." + } + ] + } + }, "origin": { "type": "object", "nullable": true, @@ -3557,6 +3768,7 @@ "scorer", "task", "tool", + "custom_view", null ] }, @@ -4367,6 +4579,35 @@ "type", "url" ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "slack" + ], + "description": "The type of action to take" + }, + "workspace_id": { + "type": "string", + "description": "The Slack workspace ID to post to" + }, + "channel": { + "type": "string", + "description": "The Slack channel ID to post to" + }, + "message_template": { + "type": "string", + "description": "Custom message template for the alert" + } + }, + "required": [ + "type", + "workspace_id", + "channel" + ] } ], "description": "The action to take when the automation rule is triggered" @@ -4598,6 +4839,35 @@ "type", "url" ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "slack" + ], + "description": "The type of action to take" + }, + "workspace_id": { + "type": "string", + "description": "The Slack workspace ID to post to" + }, + "channel": { + "type": "string", + "description": "The Slack channel ID to post to" + }, + "message_template": { + "type": "string", + "description": "Custom message template for the alert" + } + }, + "required": [ + "type", + "workspace_id", + "channel" + ] } ], "description": "The action to take when the automation rule is triggered" @@ -4824,6 +5094,35 @@ "type", "url" ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "slack" + ], + "description": "The type of action to take" + }, + "workspace_id": { + "type": "string", + "description": "The Slack workspace ID to post to" + }, + "channel": { + "type": "string", + "description": "The Slack channel ID to post to" + }, + "message_template": { + "type": "string", + "description": "Custom message template for the alert" + } + }, + "required": [ + "type", + "workspace_id", + "channel" + ] } ], "description": "The action to take when the automation rule is triggered" @@ -5447,7 +5746,8 @@ "type": "string", "enum": [ "node", - "python" + "python", + "browser" ] }, "version": { @@ -6093,7 +6393,8 @@ "type": "string", "enum": [ "node", - "python" + "python", + "browser" ] }, "version": { @@ -6451,7 +6752,8 @@ "type": "string", "enum": [ "node", - "python" + "python", + "browser" ] }, "version": { @@ -6694,6 +6996,19 @@ "nullable": true, "description": "If true, throw an error if one of the variables in the prompt is not present in the input" }, + "mcp_auth": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "oauth_token": { + "type": "string", + "description": "The OAuth token to use" + } + } + }, + "description": "Map of MCP server URL to auth credentials" + }, "version": { "type": "string", "description": "The version of the function" @@ -6812,6 +7127,10 @@ "nullable": true } } + }, + "freezeColumns": { + "type": "boolean", + "nullable": true } }, "required": [ @@ -7012,6 +7331,10 @@ "spans", null ] + }, + "freezeColumns": { + "type": "boolean", + "nullable": true } }, "title": "TableViewOptions" @@ -7314,17 +7637,46 @@ "type": "string", "nullable": true, "description": "If invite emails failed to send for some reason, the patch operation will still complete, but we will return an error message here" - } - }, - "required": [ - "status", - "org_id" - ] - }, - "PatchOrganizationMembers": { - "type": "object", - "properties": { - "invite_users": { + }, + "added_users": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "email": { + "type": "string", + "nullable": true + }, + "api_key": { + "type": "string", + "nullable": true + }, + "token_name": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id" + ] + }, + "description": "If service accounts with tokens were created, this will contain the added users with their API keys" + } + }, + "required": [ + "status", + "org_id" + ] + }, + "PatchOrganizationMembers": { + "type": "object", + "properties": { + "invite_users": { "type": "object", "nullable": true, "properties": { @@ -7837,6 +8189,28 @@ "nullable": true, "format": "date-time", "description": "Date the environment variable was last used" + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" + }, + "secret_category": { + "type": "string", + "enum": [ + "env_var", + "ai_provider" + ], + "default": "env_var", + "description": "The category of the secret: env_var for regular environment variables, ai_provider for AI provider API keys" } }, "required": [ @@ -7846,6 +8220,106 @@ "name" ] }, + "MCPServer": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the MCP server" + }, + "project_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project that the MCP server belongs under" + }, + "user_id": { + "type": "string", + "nullable": true, + "format": "uuid", + "description": "Identifies the user who created the MCP server" + }, + "created": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of MCP server creation" + }, + "deleted_at": { + "type": "string", + "nullable": true, + "format": "date-time", + "description": "Date of MCP server deletion, or null if the MCP server is still active" + }, + "name": { + "type": "string", + "description": "Name of the MCP server. Within a project, MCP server names are unique" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the MCP server" + }, + "url": { + "type": "string", + "description": "URL of the MCP server endpoint" + } + }, + "required": [ + "id", + "project_id", + "name", + "url" + ] + }, + "CreateMCPServer": { + "type": "object", + "properties": { + "project_id": { + "type": "string", + "format": "uuid", + "description": "Unique identifier for the project that the MCP server belongs under" + }, + "name": { + "type": "string", + "description": "Name of the MCP server. Within a project, MCP server names are unique" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the MCP server" + }, + "url": { + "type": "string", + "description": "URL of the MCP server endpoint" + } + }, + "required": [ + "project_id", + "name", + "url" + ] + }, + "PatchMCPServer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Name of the MCP server. Within a project, MCP server names are unique" + }, + "url": { + "type": "string", + "nullable": true, + "description": "URL of the MCP server endpoint" + }, + "description": { + "type": "string", + "nullable": true, + "description": "Textual description of the MCP server" + } + } + }, "CrossObjectInsertResponse": { "type": "object", "properties": { @@ -7977,6 +8451,75 @@ "$ref": "#/components/schemas/SavedFunctionId" } }, + "mcp": { + "type": "object", + "nullable": true, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "id" + ] + }, + "id": { + "type": "string", + "format": "uuid" + }, + "is_disabled": { + "type": "boolean" + }, + "enabled_tools": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "If omitted, all tools are enabled" + } + }, + "required": [ + "type", + "id" + ], + "title": "MCP server id. This is used for project-level MCP server definitions." + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ] + }, + "url": { + "type": "string" + }, + "is_disabled": { + "type": "boolean" + }, + "enabled_tools": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + }, + "description": "If omitted, all tools are enabled" + } + }, + "required": [ + "type", + "url" + ], + "title": "MCP server url. This is used for inline definitions of MCP servers." + } + ] + } + }, "origin": { "type": "object", "nullable": true, @@ -8001,6 +8544,7 @@ "scorer", "task", "tool", + "custom_view", null ] }, @@ -8094,7 +8638,8 @@ "type": "string", "enum": [ "node", - "python" + "python", + "browser" ] }, "version": { @@ -8388,6 +8933,18 @@ "type": "string" }, "description": "Optional tags that will be added to the experiment." + }, + "mcp_auth": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "oauth_token": { + "type": "string", + "description": "The OAuth token to use" + } + } + } } }, "required": [ @@ -8579,6 +9136,15 @@ "name": "env_var_id", "in": "path" }, + "McpServerIdParam": { + "schema": { + "$ref": "#/components/schemas/McpServerIdParam" + }, + "required": true, + "description": "McpServer id", + "name": "mcp_server_id", + "in": "path" + }, "ProjectIdQuery": { "schema": { "$ref": "#/components/schemas/ProjectIdQuery" @@ -8758,6 +9324,16 @@ "in": "query", "allowReserved": true }, + "McpServerName": { + "schema": { + "$ref": "#/components/schemas/McpServerName" + }, + "required": false, + "description": "Name of the mcp_server to search for", + "name": "mcp_server_name", + "in": "query", + "allowReserved": true + }, "OrgName": { "schema": { "$ref": "#/components/schemas/OrgName" @@ -25465,6 +26041,19 @@ "type": "string", "nullable": true, "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" } }, "required": [ @@ -25607,6 +26196,19 @@ "type": "string", "nullable": true, "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" } }, "required": [ @@ -26036,6 +26638,19 @@ "type": "string", "nullable": true, "description": "The value of the environment variable. Will be encrypted at rest." + }, + "metadata": { + "type": "object", + "nullable": true, + "additionalProperties": { + "nullable": true + }, + "description": "Optional metadata associated with the environment variable when managed via the function secrets API" + }, + "secret_type": { + "type": "string", + "nullable": true, + "description": "Optional classification for the secret (for example, the AI provider name)" } }, "required": [ @@ -26302,6 +26917,816 @@ } } }, + "/v1/mcp_server": { + "post": { + "tags": [ + "McpServers" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "postMcpServer", + "description": "Create a new mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will return the existing mcp_server unmodified", + "summary": "Create mcp_server", + "requestBody": { + "description": "Any desired information about the new mcp_server object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMCPServer" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new mcp_server object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServer" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "put": { + "tags": [ + "McpServers" + ], + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "operationId": "putMcpServer", + "description": "Create or replace mcp_server. If there is an existing mcp_server with the same name as the one specified in the request, will replace the existing mcp_server with the provided fields", + "summary": "Create or replace mcp_server", + "requestBody": { + "description": "Any desired information about the new mcp_server object", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMCPServer" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the new mcp_server object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServer" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "get": { + "operationId": "getMcpServer", + "tags": [ + "McpServers" + ], + "description": "List out all mcp_servers. The mcp_servers are sorted by creation date, with the most recently-created mcp_servers coming first", + "summary": "List mcp_servers", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/AppLimitParam" + }, + { + "$ref": "#/components/parameters/StartingAfter" + }, + { + "$ref": "#/components/parameters/EndingBefore" + }, + { + "$ref": "#/components/parameters/Ids" + }, + { + "$ref": "#/components/parameters/McpServerName" + }, + { + "$ref": "#/components/parameters/OrgName" + } + ], + "responses": { + "200": { + "description": "Returns a list of mcp_server objects", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "objects": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MCPServer" + }, + "description": "A list of mcp_server objects" + } + }, + "required": [ + "objects" + ], + "additionalProperties": false + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsMcpServer", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/mcp_server`)", + "security": [], + "tags": [ + "CORS" + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, + "/v1/mcp_server/{mcp_server_id}": { + "get": { + "operationId": "getMcpServerId", + "tags": [ + "McpServers" + ], + "description": "Get a mcp_server object by its id", + "summary": "Get mcp_server", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/McpServerIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the mcp_server object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServer" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "patch": { + "operationId": "patchMcpServerId", + "tags": [ + "McpServers" + ], + "description": "Partially update a mcp_server object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.", + "summary": "Partially update mcp_server", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/McpServerIdParam" + } + ], + "requestBody": { + "description": "Fields to update", + "required": false, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchMCPServer" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the mcp_server object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServer" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "delete": { + "operationId": "deleteMcpServerId", + "tags": [ + "McpServers" + ], + "description": "Delete a mcp_server object by its id", + "summary": "Delete mcp_server", + "security": [ + { + "bearerAuth": [] + }, + {} + ], + "parameters": [ + { + "$ref": "#/components/parameters/McpServerIdParam" + } + ], + "responses": { + "200": { + "description": "Returns the deleted mcp_server object", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MCPServer" + } + } + } + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "401": { + "description": "No valid API key provided", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "403": { + "description": "The API key doesn’t have permissions to perform the request", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "429": { + "description": "Too many requests hit the API too quickly. We recommend an exponential backoff of your requests", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + }, + "500": { + "description": "Something went wrong on Braintrust's end. (These are rare.)", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + }, + "options": { + "operationId": "optionsMcpServerId", + "description": "Enable CORS", + "summary": "Enable CORS (`/v1/mcp_server/{mcp_server_id}`)", + "security": [], + "tags": [ + "CORS" + ], + "parameters": [ + { + "$ref": "#/components/parameters/McpServerIdParam" + } + ], + "responses": { + "200": { + "description": "Response for CORS method", + "headers": { + "Access-Control-Allow-Credentials": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "schema": { + "type": "string" + } + }, + "Access-Control-Max-Age": { + "schema": { + "type": "string" + } + } + }, + "content": {} + }, + "400": { + "description": "The request was unacceptable, often due to missing a required parameter", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + }, + "application/json": { + "schema": { + "nullable": true + } + } + } + } + } + } + }, "/v1": { "get": { "operationId": "getIndex", diff --git a/openapi/spec.yaml b/openapi/spec.yaml index 8207f19..471c74b 100644 --- a/openapi/spec.yaml +++ b/openapi/spec.yaml @@ -108,6 +108,10 @@ components: type: string format: uuid description: EnvVar id + McpServerIdParam: + type: string + format: uuid + description: McpServer id ProjectIdQuery: type: string format: uuid @@ -163,6 +167,9 @@ components: EnvVarName: type: string description: Name of the env_var to search for + McpServerName: + type: string + description: Name of the mcp_server to search for OrgName: type: string description: Filter search results to within a particular organization @@ -508,6 +515,11 @@ components: - url - name description: The remote eval sources to use for the project + disable_realtime_queries: + type: boolean + nullable: true + description: If true, disable real-time queries for this project. This can + improve query performance for high-volume logs. Project: type: object properties: @@ -522,6 +534,10 @@ components: name: type: string description: Name of the project + description: + type: string + nullable: true + description: Textual description of the project created: type: string nullable: true @@ -550,6 +566,10 @@ components: type: string minLength: 1 description: Name of the project + description: + type: string + nullable: true + description: Textual description of the project org_name: type: string nullable: true @@ -565,6 +585,9 @@ components: type: string nullable: true description: Name of the project + description: + type: string + nullable: true settings: allOf: - $ref: "#/components/schemas/ProjectSettings" @@ -1142,6 +1165,21 @@ components: $ref: "#/components/schemas/SpanAttributes" origin: $ref: "#/components/schemas/ObjectReferenceNullish" + comments: + type: array + nullable: true + items: + nullable: true + description: Optional list of comments attached to this event + audit_data: + type: array + nullable: true + items: + nullable: true + description: Optional list of audit entries attached to this event + _async_scoring_state: + nullable: true + description: The async scoring state for this event required: - id - _xact_id @@ -2030,6 +2068,18 @@ components: description: Whether this span is a root span origin: $ref: "#/components/schemas/ObjectReferenceNullish" + comments: + type: array + nullable: true + items: + nullable: true + description: Optional list of comments attached to this event + audit_data: + type: array + nullable: true + items: + nullable: true + description: Optional list of audit entries attached to this event required: - id - _xact_id @@ -2594,6 +2644,18 @@ components: description: Whether this span is a root span origin: $ref: "#/components/schemas/ObjectReferenceNullish" + comments: + type: array + nullable: true + items: + nullable: true + description: Optional list of comments attached to this event + audit_data: + type: array + nullable: true + items: + nullable: true + description: Optional list of audit entries attached to this event required: - id - _xact_id @@ -2781,10 +2843,34 @@ components: - image_url - type title: image_url + ChatCompletionContentPartFileFile: + type: object + properties: + file_data: + type: string + filename: + type: string + file_id: + type: string + title: The ID of an uploaded file to use as input. + ChatCompletionContentPartFileWithTitle: + type: object + properties: + file: + $ref: "#/components/schemas/ChatCompletionContentPartFileFile" + type: + type: string + enum: + - file + required: + - file + - type + title: file ChatCompletionContentPart: anyOf: - $ref: "#/components/schemas/ChatCompletionContentPartTextWithTitle" - $ref: "#/components/schemas/ChatCompletionContentPartImageWithTitle" + - $ref: "#/components/schemas/ChatCompletionContentPartFileWithTitle" title: chat_completion_content_part ChatCompletionMessageToolCall: type: object @@ -3063,6 +3149,10 @@ components: properties: use_cache: type: boolean + reasoning_enabled: + type: boolean + reasoning_budget: + type: number temperature: type: number top_p: @@ -3135,6 +3225,7 @@ components: reasoning_effort: type: string enum: + - none - minimal - low - medium @@ -3154,6 +3245,10 @@ components: properties: use_cache: type: boolean + reasoning_enabled: + type: boolean + reasoning_budget: + type: number max_tokens: type: number temperature: @@ -3166,10 +3261,6 @@ components: type: array items: type: string - reasoning_enabled: - type: boolean - reasoning_budget: - type: number max_tokens_to_sample: type: number description: This is a legacy parameter that should not be used. @@ -3185,6 +3276,10 @@ components: properties: use_cache: type: boolean + reasoning_enabled: + type: boolean + reasoning_budget: + type: number temperature: type: number maxOutputTokens: @@ -3202,6 +3297,10 @@ components: properties: use_cache: type: boolean + reasoning_enabled: + type: boolean + reasoning_budget: + type: number temperature: type: number topK: @@ -3215,6 +3314,10 @@ components: properties: use_cache: type: boolean + reasoning_enabled: + type: boolean + reasoning_budget: + type: number additionalProperties: nullable: true title: JsCompletionParams @@ -3291,6 +3394,52 @@ components: nullable: true items: $ref: "#/components/schemas/SavedFunctionId" + mcp: + type: object + nullable: true + additionalProperties: + oneOf: + - type: object + properties: + type: + type: string + enum: + - id + id: + type: string + format: uuid + is_disabled: + type: boolean + enabled_tools: + type: array + nullable: true + items: + type: string + description: If omitted, all tools are enabled + required: + - type + - id + title: MCP server id. This is used for project-level MCP server definitions. + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + is_disabled: + type: boolean + enabled_tools: + type: array + nullable: true + items: + type: string + description: If omitted, all tools are enabled + required: + - type + - url + title: MCP server url. This is used for inline definitions of MCP servers. origin: type: object nullable: true @@ -3310,6 +3459,7 @@ components: - scorer - task - tool + - custom_view - null Prompt: type: object @@ -4021,6 +4171,26 @@ components: required: - type - url + - type: object + properties: + type: + type: string + enum: + - slack + description: The type of action to take + workspace_id: + type: string + description: The Slack workspace ID to post to + channel: + type: string + description: The Slack channel ID to post to + message_template: + type: string + description: Custom message template for the alert + required: + - type + - workspace_id + - channel description: The action to take when the automation rule is triggered required: - event_type @@ -4182,6 +4352,26 @@ components: required: - type - url + - type: object + properties: + type: + type: string + enum: + - slack + description: The type of action to take + workspace_id: + type: string + description: The Slack workspace ID to post to + channel: + type: string + description: The Slack channel ID to post to + message_template: + type: string + description: Custom message template for the alert + required: + - type + - workspace_id + - channel description: The action to take when the automation rule is triggered required: - event_type @@ -4338,6 +4528,26 @@ components: required: - type - url + - type: object + properties: + type: + type: string + enum: + - slack + description: The type of action to take + workspace_id: + type: string + description: The Slack workspace ID to post to + channel: + type: string + description: The Slack channel ID to post to + message_template: + type: string + description: Custom message template for the alert + required: + - type + - workspace_id + - channel description: The action to take when the automation rule is triggered required: - event_type @@ -4805,6 +5015,7 @@ components: enum: - node - python + - browser version: type: string required: @@ -5239,6 +5450,7 @@ components: enum: - node - python + - browser version: type: string required: @@ -5491,6 +5703,7 @@ components: enum: - node - python + - browser version: type: string required: @@ -5658,6 +5871,15 @@ components: nullable: true description: If true, throw an error if one of the variables in the prompt is not present in the input + mcp_auth: + type: object + additionalProperties: + type: object + properties: + oauth_token: + type: string + description: The OAuth token to use + description: Map of MCP server URL to auth credentials version: type: string description: The version of the function @@ -5743,6 +5965,9 @@ components: groupBy: type: string nullable: true + freezeColumns: + type: boolean + nullable: true required: - viewType - options @@ -5882,6 +6107,9 @@ components: - traces - spans - null + freezeColumns: + type: boolean + nullable: true title: TableViewOptions - type: "null" description: Options for the view in the app @@ -6117,6 +6345,28 @@ components: description: If invite emails failed to send for some reason, the patch operation will still complete, but we will return an error message here + added_users: + type: array + nullable: true + items: + type: object + properties: + id: + type: string + format: uuid + email: + type: string + nullable: true + api_key: + type: string + nullable: true + token_name: + type: string + nullable: true + required: + - id + description: If service accounts with tokens were created, this will contain the + added users with their API keys required: - status - org_id @@ -6529,11 +6779,109 @@ components: nullable: true format: date-time description: Date the environment variable was last used + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: Optional metadata associated with the environment variable when + managed via the function secrets API + secret_type: + type: string + nullable: true + description: Optional classification for the secret (for example, the AI + provider name) + secret_category: + type: string + enum: + - env_var + - ai_provider + default: env_var + description: "The category of the secret: env_var for regular environment + variables, ai_provider for AI provider API keys" required: - id - object_type - object_id - name + MCPServer: + type: object + properties: + id: + type: string + format: uuid + description: Unique identifier for the MCP server + project_id: + type: string + format: uuid + description: Unique identifier for the project that the MCP server belongs under + user_id: + type: string + nullable: true + format: uuid + description: Identifies the user who created the MCP server + created: + type: string + nullable: true + format: date-time + description: Date of MCP server creation + deleted_at: + type: string + nullable: true + format: date-time + description: Date of MCP server deletion, or null if the MCP server is still + active + name: + type: string + description: Name of the MCP server. Within a project, MCP server names are unique + description: + type: string + nullable: true + description: Textual description of the MCP server + url: + type: string + description: URL of the MCP server endpoint + required: + - id + - project_id + - name + - url + CreateMCPServer: + type: object + properties: + project_id: + type: string + format: uuid + description: Unique identifier for the project that the MCP server belongs under + name: + type: string + description: Name of the MCP server. Within a project, MCP server names are unique + description: + type: string + nullable: true + description: Textual description of the MCP server + url: + type: string + description: URL of the MCP server endpoint + required: + - project_id + - name + - url + PatchMCPServer: + type: object + properties: + name: + type: string + nullable: true + description: Name of the MCP server. Within a project, MCP server names are unique + url: + type: string + nullable: true + description: URL of the MCP server endpoint + description: + type: string + nullable: true + description: Textual description of the MCP server CrossObjectInsertResponse: type: object properties: @@ -6632,35 +6980,82 @@ components: nullable: true items: $ref: "#/components/schemas/SavedFunctionId" - origin: + mcp: type: object nullable: true - properties: - prompt_id: - type: string - project_id: - type: string - prompt_version: - type: string - FunctionTypeEnum: - type: string - enum: - - llm - - scorer - - task - - tool - - null - FunctionId: - anyOf: - - type: object - properties: - function_id: - type: string - description: The ID of the function - version: - type: string - description: The version of the function - required: + additionalProperties: + oneOf: + - type: object + properties: + type: + type: string + enum: + - id + id: + type: string + format: uuid + is_disabled: + type: boolean + enabled_tools: + type: array + nullable: true + items: + type: string + description: If omitted, all tools are enabled + required: + - type + - id + title: MCP server id. This is used for project-level MCP server definitions. + - type: object + properties: + type: + type: string + enum: + - url + url: + type: string + is_disabled: + type: boolean + enabled_tools: + type: array + nullable: true + items: + type: string + description: If omitted, all tools are enabled + required: + - type + - url + title: MCP server url. This is used for inline definitions of MCP servers. + origin: + type: object + nullable: true + properties: + prompt_id: + type: string + project_id: + type: string + prompt_version: + type: string + FunctionTypeEnum: + type: string + enum: + - llm + - scorer + - task + - tool + - custom_view + - null + FunctionId: + anyOf: + - type: object + properties: + function_id: + type: string + description: The ID of the function + version: + type: string + description: The version of the function + required: - function_id description: Function id title: function_id @@ -6716,6 +7111,7 @@ components: enum: - node - python + - browser version: type: string required: @@ -6932,6 +7328,14 @@ components: items: type: string description: Optional tags that will be added to the experiment. + mcp_auth: + type: object + additionalProperties: + type: object + properties: + oauth_token: + type: string + description: The OAuth token to use required: - project_id - data @@ -7078,6 +7482,13 @@ components: description: EnvVar id name: env_var_id in: path + McpServerIdParam: + schema: + $ref: "#/components/schemas/McpServerIdParam" + required: true + description: McpServer id + name: mcp_server_id + in: path ProjectIdQuery: schema: $ref: "#/components/schemas/ProjectIdQuery" @@ -7221,6 +7632,14 @@ components: name: env_var_name in: query allowReserved: true + McpServerName: + schema: + $ref: "#/components/schemas/McpServerName" + required: false + description: Name of the mcp_server to search for + name: mcp_server_name + in: query + allowReserved: true OrgName: schema: $ref: "#/components/schemas/OrgName" @@ -17761,6 +18180,18 @@ paths: type: string nullable: true description: The value of the environment variable. Will be encrypted at rest. + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: Optional metadata associated with the environment variable when + managed via the function secrets API + secret_type: + type: string + nullable: true + description: Optional classification for the secret (for example, the AI + provider name) required: - object_type - object_id @@ -17856,6 +18287,18 @@ paths: type: string nullable: true description: The value of the environment variable. Will be encrypted at rest. + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: Optional metadata associated with the environment variable when + managed via the function secrets API + secret_type: + type: string + nullable: true + description: Optional classification for the secret (for example, the AI + provider name) required: - object_type - object_id @@ -18125,6 +18568,18 @@ paths: type: string nullable: true description: The value of the environment variable. Will be encrypted at rest. + metadata: + type: object + nullable: true + additionalProperties: + nullable: true + description: Optional metadata associated with the environment variable when + managed via the function secrets API + secret_type: + type: string + nullable: true + description: Optional classification for the secret (for example, the AI + provider name) required: - name responses: @@ -18285,6 +18740,513 @@ paths: application/json: schema: nullable: true + /v1/mcp_server: + post: + tags: + - McpServers + security: + - bearerAuth: [] + - {} + operationId: postMcpServer + description: Create a new mcp_server. If there is an existing mcp_server with + the same name as the one specified in the request, will return the + existing mcp_server unmodified + summary: Create mcp_server + requestBody: + description: Any desired information about the new mcp_server object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateMCPServer" + responses: + "200": + description: Returns the new mcp_server object + content: + application/json: + schema: + $ref: "#/components/schemas/MCPServer" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + put: + tags: + - McpServers + security: + - bearerAuth: [] + - {} + operationId: putMcpServer + description: Create or replace mcp_server. If there is an existing mcp_server + with the same name as the one specified in the request, will replace the + existing mcp_server with the provided fields + summary: Create or replace mcp_server + requestBody: + description: Any desired information about the new mcp_server object + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/CreateMCPServer" + responses: + "200": + description: Returns the new mcp_server object + content: + application/json: + schema: + $ref: "#/components/schemas/MCPServer" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + get: + operationId: getMcpServer + tags: + - McpServers + description: List out all mcp_servers. The mcp_servers are sorted by creation + date, with the most recently-created mcp_servers coming first + summary: List mcp_servers + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/AppLimitParam" + - $ref: "#/components/parameters/StartingAfter" + - $ref: "#/components/parameters/EndingBefore" + - $ref: "#/components/parameters/Ids" + - $ref: "#/components/parameters/McpServerName" + - $ref: "#/components/parameters/OrgName" + responses: + "200": + description: Returns a list of mcp_server objects + content: + application/json: + schema: + type: object + properties: + objects: + type: array + items: + $ref: "#/components/schemas/MCPServer" + description: A list of mcp_server objects + required: + - objects + additionalProperties: false + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsMcpServer + description: Enable CORS + summary: Enable CORS (`/v1/mcp_server`) + security: [] + tags: + - CORS + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + /v1/mcp_server/{mcp_server_id}: + get: + operationId: getMcpServerId + tags: + - McpServers + description: Get a mcp_server object by its id + summary: Get mcp_server + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/McpServerIdParam" + responses: + "200": + description: Returns the mcp_server object + content: + application/json: + schema: + $ref: "#/components/schemas/MCPServer" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + patch: + operationId: patchMcpServerId + tags: + - McpServers + description: Partially update a mcp_server object. Specify the fields to update + in the payload. Any object-type fields will be deep-merged with existing + content. Currently we do not support removing fields or setting them to + null. + summary: Partially update mcp_server + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/McpServerIdParam" + requestBody: + description: Fields to update + required: false + content: + application/json: + schema: + $ref: "#/components/schemas/PatchMCPServer" + responses: + "200": + description: Returns the mcp_server object + content: + application/json: + schema: + $ref: "#/components/schemas/MCPServer" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + delete: + operationId: deleteMcpServerId + tags: + - McpServers + description: Delete a mcp_server object by its id + summary: Delete mcp_server + security: + - bearerAuth: [] + - {} + parameters: + - $ref: "#/components/parameters/McpServerIdParam" + responses: + "200": + description: Returns the deleted mcp_server object + content: + application/json: + schema: + $ref: "#/components/schemas/MCPServer" + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "401": + description: No valid API key provided + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "403": + description: The API key doesn’t have permissions to perform the request + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "429": + description: Too many requests hit the API too quickly. We recommend an + exponential backoff of your requests + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + "500": + description: Something went wrong on Braintrust's end. (These are rare.) + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true + options: + operationId: optionsMcpServerId + description: Enable CORS + summary: Enable CORS (`/v1/mcp_server/{mcp_server_id}`) + security: [] + tags: + - CORS + parameters: + - $ref: "#/components/parameters/McpServerIdParam" + responses: + "200": + description: Response for CORS method + headers: + Access-Control-Allow-Credentials: + schema: + type: string + Access-Control-Allow-Headers: + schema: + type: string + Access-Control-Allow-Methods: + schema: + type: string + Access-Control-Allow-Origin: + schema: + type: string + Access-Control-Max-Age: + schema: + type: string + content: {} + "400": + description: The request was unacceptable, often due to missing a required + parameter + content: + text/plain: + schema: + type: string + application/json: + schema: + nullable: true /v1: get: operationId: getIndex