2025-02-13 13:50:02 -05:00
{
"openapi" : "3.0.3" ,
"info" : {
"title" : "goose-server" ,
"description" : "An AI agent" ,
"contact" : {
"name" : "Block" ,
"email" : "ai-oss-tools@block.xyz"
} ,
"license" : {
"name" : "Apache-2.0"
} ,
2025-04-21 14:36:12 -04:00
"version" : "1.0.19"
2025-02-13 13:50:02 -05:00
} ,
"paths" : {
2025-04-07 19:49:58 -04:00
"/agent/tools" : {
"get" : {
"tags" : [
"super::routes::agent"
] ,
"operationId" : "get_tools" ,
2025-04-08 09:47:29 -07:00
"parameters" : [
{
"name" : "extension_name" ,
"in" : "query" ,
"description" : "Optional extension name to filter tools" ,
"required" : false ,
"schema" : {
"type" : "string" ,
"nullable" : true
}
}
] ,
2025-04-07 19:49:58 -04:00
"responses" : {
"200" : {
"description" : "Tools retrieved successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
2025-04-11 12:19:08 -07:00
"$ref" : "#/components/schemas/ToolInfo"
2025-04-07 19:49:58 -04:00
}
}
}
}
} ,
"401" : {
"description" : "Unauthorized - invalid secret key"
} ,
"424" : {
"description" : "Agent not initialized"
} ,
"500" : {
"description" : "Internal server error"
}
}
}
} ,
2025-02-13 13:50:02 -05:00
"/config" : {
"get" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "read_all_config" ,
"responses" : {
"200" : {
"description" : "All configuration values retrieved successfully" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ConfigResponse"
}
}
}
}
}
}
} ,
2025-04-18 14:01:46 -07:00
"/config/backup" : {
"post" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "backup_config" ,
"responses" : {
"200" : {
"description" : "Config file backed up" ,
"content" : {
"text/plain" : {
"schema" : {
"type" : "string"
}
}
}
} ,
"500" : {
"description" : "Internal server error"
}
}
}
} ,
2025-03-12 18:41:31 -07:00
"/config/extensions" : {
"get" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "get_extensions" ,
"responses" : {
"200" : {
"description" : "All extensions retrieved successfully" ,
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ExtensionResponse"
}
}
}
} ,
"500" : {
"description" : "Internal server error"
}
}
} ,
2025-02-13 13:50:02 -05:00
"post" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "add_extension" ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ExtensionQuery"
}
}
} ,
"required" : true
} ,
"responses" : {
"200" : {
2025-03-14 09:06:50 -07:00
"description" : "Extension added or updated successfully" ,
2025-02-13 13:50:02 -05:00
"content" : {
"text/plain" : {
"schema" : {
"type" : "string"
}
}
}
} ,
"400" : {
"description" : "Invalid request"
} ,
2025-04-04 09:55:48 -04:00
"422" : {
"description" : "Could not serialize config.yaml"
} ,
2025-02-13 13:50:02 -05:00
"500" : {
"description" : "Internal server error"
}
}
2025-03-12 18:41:31 -07:00
}
} ,
"/config/extensions/{name}" : {
2025-02-13 13:50:02 -05:00
"delete" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "remove_extension" ,
2025-03-12 18:41:31 -07:00
"parameters" : [
{
"name" : "name" ,
"in" : "path" ,
"required" : true ,
"schema" : {
"type" : "string"
2025-02-13 13:50:02 -05:00
}
2025-03-12 18:41:31 -07:00
}
] ,
2025-02-13 13:50:02 -05:00
"responses" : {
"200" : {
"description" : "Extension removed successfully" ,
"content" : {
"text/plain" : {
"schema" : {
"type" : "string"
}
}
}
} ,
"404" : {
"description" : "Extension not found"
} ,
"500" : {
"description" : "Internal server error"
}
}
}
} ,
2025-04-09 11:31:19 -04:00
"/config/init" : {
"post" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "init_config" ,
"responses" : {
"200" : {
"description" : "Config initialization check completed" ,
"content" : {
"text/plain" : {
"schema" : {
"type" : "string"
}
}
}
} ,
"500" : {
"description" : "Internal server error"
}
}
}
} ,
2025-04-11 12:19:08 -07:00
"/config/permissions" : {
"post" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "upsert_permissions" ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/UpsertPermissionsQuery"
}
}
} ,
"required" : true
} ,
"responses" : {
"200" : {
"description" : "Permission update completed" ,
"content" : {
"text/plain" : {
"schema" : {
"type" : "string"
}
}
}
} ,
"400" : {
"description" : "Invalid request"
}
}
}
} ,
2025-03-10 09:51:54 -07:00
"/config/providers" : {
"get" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "providers" ,
"responses" : {
"200" : {
"description" : "All configuration values retrieved successfully" ,
"content" : {
"application/json" : {
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/ProviderDetails"
}
}
}
}
}
}
}
} ,
2025-02-13 13:50:02 -05:00
"/config/read" : {
2025-03-10 17:07:14 -07:00
"post" : {
2025-02-13 13:50:02 -05:00
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "read_config" ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ConfigKeyQuery"
}
}
} ,
"required" : true
} ,
"responses" : {
"200" : {
"description" : "Configuration value retrieved successfully" ,
"content" : {
"application/json" : {
"schema" : { }
}
}
} ,
"404" : {
"description" : "Configuration key not found"
}
}
}
} ,
"/config/remove" : {
"post" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "remove_config" ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/ConfigKeyQuery"
}
}
} ,
"required" : true
} ,
"responses" : {
"200" : {
"description" : "Configuration value removed successfully" ,
"content" : {
"text/plain" : {
"schema" : {
"type" : "string"
}
}
}
} ,
"404" : {
"description" : "Configuration key not found"
} ,
"500" : {
"description" : "Internal server error"
}
}
}
} ,
"/config/upsert" : {
"post" : {
"tags" : [
"super::routes::config_management"
] ,
"operationId" : "upsert_config" ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/UpsertConfigQuery"
}
}
} ,
"required" : true
} ,
"responses" : {
"200" : {
"description" : "Configuration value upserted successfully" ,
"content" : {
"text/plain" : {
"schema" : {
"type" : "string"
}
}
}
} ,
"500" : {
"description" : "Internal server error"
}
}
}
2025-04-11 13:58:54 -07:00
} ,
"/confirm" : {
"post" : {
"tags" : [
"super::routes::reply"
] ,
"operationId" : "confirm_permission" ,
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/PermissionConfirmationRequest"
}
}
} ,
"required" : true
} ,
"responses" : {
"200" : {
"description" : "Permission action is confirmed" ,
"content" : {
"application/json" : {
"schema" : { }
}
}
} ,
"401" : {
"description" : "Unauthorized - invalid secret key"
} ,
"500" : {
"description" : "Internal server error"
}
}
}
2025-02-13 13:50:02 -05:00
}
} ,
"components" : {
"schemas" : {
2025-03-10 09:51:54 -07:00
"ConfigKey" : {
"type" : "object" ,
"required" : [
"name" ,
"required" ,
"secret"
] ,
"properties" : {
"default" : {
"type" : "string" ,
"nullable" : true
} ,
"name" : {
"type" : "string"
} ,
"required" : {
"type" : "boolean"
} ,
"secret" : {
"type" : "boolean"
}
}
} ,
2025-02-13 13:50:02 -05:00
"ConfigKeyQuery" : {
"type" : "object" ,
"required" : [
2025-03-10 09:51:54 -07:00
"key" ,
"is_secret"
2025-02-13 13:50:02 -05:00
] ,
"properties" : {
2025-03-10 09:51:54 -07:00
"is_secret" : {
"type" : "boolean"
} ,
2025-02-13 13:50:02 -05:00
"key" : {
"type" : "string"
}
}
} ,
"ConfigResponse" : {
"type" : "object" ,
"required" : [
"config"
] ,
"properties" : {
"config" : {
"type" : "object" ,
"additionalProperties" : { }
}
}
} ,
2025-03-12 18:41:31 -07:00
"Envs" : {
"type" : "object" ,
"additionalProperties" : {
"type" : "string" ,
"description" : "A map of environment variables to set, e.g. API_KEY -> some_secret, HOST -> host"
}
} ,
"ExtensionConfig" : {
"oneOf" : [
{
"type" : "object" ,
"description" : "Server-sent events client with a URI endpoint" ,
"required" : [
"name" ,
"uri" ,
"type"
] ,
"properties" : {
2025-04-09 17:27:40 -04:00
"bundled" : {
"type" : "boolean" ,
"description" : "Whether this extension is bundled with Goose" ,
"nullable" : true
} ,
2025-03-20 12:08:51 -04:00
"description" : {
"type" : "string" ,
"nullable" : true
} ,
2025-04-18 14:01:46 -07:00
"env_keys" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-03-12 18:41:31 -07:00
"envs" : {
"$ref" : "#/components/schemas/Envs"
} ,
"name" : {
"type" : "string" ,
"description" : "The name used to identify this extension"
} ,
"timeout" : {
"type" : "integer" ,
"format" : "int64" ,
"nullable" : true ,
"minimum" : 0
} ,
"type" : {
"type" : "string" ,
"enum" : [
"sse"
]
} ,
"uri" : {
"type" : "string"
}
}
} ,
{
"type" : "object" ,
"description" : "Standard I/O client with command and arguments" ,
"required" : [
"name" ,
"cmd" ,
"args" ,
"type"
] ,
"properties" : {
"args" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-04-09 17:27:40 -04:00
"bundled" : {
"type" : "boolean" ,
"description" : "Whether this extension is bundled with Goose" ,
"nullable" : true
} ,
2025-03-12 18:41:31 -07:00
"cmd" : {
"type" : "string"
} ,
2025-03-20 12:08:51 -04:00
"description" : {
"type" : "string" ,
"nullable" : true
} ,
2025-04-18 14:01:46 -07:00
"env_keys" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
2025-03-12 18:41:31 -07:00
"envs" : {
"$ref" : "#/components/schemas/Envs"
} ,
"name" : {
"type" : "string" ,
"description" : "The name used to identify this extension"
} ,
"timeout" : {
"type" : "integer" ,
"format" : "int64" ,
"nullable" : true ,
"minimum" : 0
} ,
"type" : {
"type" : "string" ,
"enum" : [
"stdio"
]
}
}
} ,
{
"type" : "object" ,
"description" : "Built-in extension that is part of the goose binary" ,
"required" : [
"name" ,
"type"
] ,
"properties" : {
2025-04-09 17:27:40 -04:00
"bundled" : {
"type" : "boolean" ,
"description" : "Whether this extension is bundled with Goose" ,
"nullable" : true
} ,
2025-03-19 15:42:57 -04:00
"display_name" : {
"type" : "string" ,
"nullable" : true
} ,
2025-03-12 18:41:31 -07:00
"name" : {
"type" : "string" ,
"description" : "The name used to identify this extension"
} ,
"timeout" : {
"type" : "integer" ,
"format" : "int64" ,
"nullable" : true ,
"minimum" : 0
} ,
"type" : {
"type" : "string" ,
"enum" : [
"builtin"
]
}
}
2025-04-04 11:58:57 -04:00
} ,
{
"type" : "object" ,
"description" : "Frontend-provided tools that will be called through the frontend" ,
"required" : [
"name" ,
"tools" ,
"type"
] ,
"properties" : {
2025-04-09 17:27:40 -04:00
"bundled" : {
"type" : "boolean" ,
"description" : "Whether this extension is bundled with Goose" ,
"nullable" : true
} ,
2025-04-04 11:58:57 -04:00
"instructions" : {
"type" : "string" ,
"description" : "Instructions for how to use these tools" ,
"nullable" : true
} ,
"name" : {
"type" : "string" ,
"description" : "The name used to identify this extension"
} ,
"tools" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/Tool"
} ,
"description" : "The tools provided by the frontend"
} ,
"type" : {
"type" : "string" ,
"enum" : [
"frontend"
]
}
}
2025-03-12 18:41:31 -07:00
}
] ,
"description" : "Represents the different types of MCP extensions that can be added to the manager" ,
"discriminator" : {
"propertyName" : "type"
}
} ,
"ExtensionEntry" : {
"allOf" : [
{
"$ref" : "#/components/schemas/ExtensionConfig"
} ,
{
"type" : "object" ,
"required" : [
"enabled"
] ,
"properties" : {
"enabled" : {
"type" : "boolean"
}
}
}
]
} ,
2025-02-13 13:50:02 -05:00
"ExtensionQuery" : {
"type" : "object" ,
"required" : [
"name" ,
2025-03-12 18:41:31 -07:00
"config" ,
"enabled"
2025-02-13 13:50:02 -05:00
] ,
"properties" : {
2025-03-12 18:41:31 -07:00
"config" : {
"$ref" : "#/components/schemas/ExtensionConfig"
} ,
"enabled" : {
"type" : "boolean"
} ,
2025-02-13 13:50:02 -05:00
"name" : {
"type" : "string"
}
}
} ,
2025-03-12 18:41:31 -07:00
"ExtensionResponse" : {
"type" : "object" ,
"required" : [
"extensions"
] ,
"properties" : {
"extensions" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/ExtensionEntry"
}
}
}
} ,
2025-04-18 10:43:50 -07:00
"ModelInfo" : {
"type" : "object" ,
"description" : "Information about a model's capabilities" ,
"required" : [
"name" ,
"context_limit"
] ,
"properties" : {
"context_limit" : {
"type" : "integer" ,
"description" : "The maximum context length this model supports" ,
"minimum" : 0
} ,
"name" : {
"type" : "string" ,
"description" : "The name of the model"
}
}
} ,
2025-04-11 13:58:54 -07:00
"PermissionConfirmationRequest" : {
"type" : "object" ,
"required" : [
"id" ,
"action"
] ,
"properties" : {
"action" : {
"type" : "string"
} ,
"id" : {
"type" : "string"
} ,
"principal_type" : {
"$ref" : "#/components/schemas/PrincipalType"
}
}
} ,
2025-04-08 09:47:29 -07:00
"PermissionLevel" : {
"type" : "string" ,
"description" : "Enum representing the possible permission levels for a tool." ,
"enum" : [
"always_allow" ,
"ask_before" ,
"never_allow"
]
} ,
2025-04-11 13:58:54 -07:00
"PrincipalType" : {
"type" : "string" ,
"enum" : [
"Extension" ,
"Tool"
]
} ,
2025-03-10 09:51:54 -07:00
"ProviderDetails" : {
"type" : "object" ,
"required" : [
"name" ,
"metadata" ,
"is_configured"
] ,
"properties" : {
"is_configured" : {
"type" : "boolean" ,
"description" : "Indicates whether the provider is fully configured"
} ,
"metadata" : {
"$ref" : "#/components/schemas/ProviderMetadata"
} ,
"name" : {
"type" : "string" ,
"description" : "Unique identifier and name of the provider"
}
}
} ,
"ProviderMetadata" : {
"type" : "object" ,
"description" : "Metadata about a provider's configuration requirements and capabilities" ,
"required" : [
"name" ,
"display_name" ,
"description" ,
"default_model" ,
"known_models" ,
"model_doc_link" ,
"config_keys"
] ,
"properties" : {
"config_keys" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/ConfigKey"
} ,
"description" : "Required configuration keys"
} ,
"default_model" : {
"type" : "string" ,
"description" : "The default/recommended model for this provider"
} ,
"description" : {
"type" : "string" ,
"description" : "Description of the provider's capabilities"
} ,
"display_name" : {
"type" : "string" ,
"description" : "Display name for the provider in UIs"
} ,
"known_models" : {
"type" : "array" ,
"items" : {
2025-04-18 10:43:50 -07:00
"$ref" : "#/components/schemas/ModelInfo"
2025-03-10 09:51:54 -07:00
} ,
2025-04-18 10:43:50 -07:00
"description" : "A list of currently known models with their capabilities\nTODO: eventually query the apis directly"
2025-03-10 09:51:54 -07:00
} ,
"model_doc_link" : {
"type" : "string" ,
"description" : "Link to the docs where models can be found"
} ,
"name" : {
"type" : "string" ,
"description" : "The unique identifier for this provider"
}
}
} ,
"ProvidersResponse" : {
"type" : "object" ,
"required" : [
"providers"
] ,
"properties" : {
"providers" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/ProviderDetails"
}
}
}
} ,
2025-04-04 11:58:57 -04:00
"Tool" : {
"type" : "object" ,
"description" : "A tool that can be used by a model." ,
"required" : [
"name" ,
"description" ,
"inputSchema"
] ,
"properties" : {
"annotations" : {
"allOf" : [
{
"$ref" : "#/components/schemas/ToolAnnotations"
}
] ,
"nullable" : true
} ,
"description" : {
"type" : "string" ,
"description" : "A description of what the tool does"
} ,
"inputSchema" : {
"description" : "A JSON Schema object defining the expected parameters for the tool"
} ,
"name" : {
"type" : "string" ,
"description" : "The name of the tool"
}
}
} ,
"ToolAnnotations" : {
"type" : "object" ,
"description" : "Additional properties describing a tool to clients.\n\nNOTE: all properties in ToolAnnotations are **hints**.\nThey are not guaranteed to provide a faithful description of\ntool behavior (including descriptive properties like `title`).\n\nClients should never make tool use decisions based on ToolAnnotations\nreceived from untrusted servers." ,
"properties" : {
"destructiveHint" : {
"type" : "boolean" ,
"description" : "If true, the tool may perform destructive updates to its environment.\nIf false, the tool performs only additive updates.\n\n(This property is meaningful only when `read_only_hint == false`)\n\nDefault: true"
} ,
"idempotentHint" : {
"type" : "boolean" ,
"description" : "If true, calling the tool repeatedly with the same arguments\nwill have no additional effect on its environment.\n\n(This property is meaningful only when `read_only_hint == false`)\n\nDefault: false"
} ,
"openWorldHint" : {
"type" : "boolean" ,
"description" : "If true, this tool may interact with an \"open world\" of external\nentities. If false, the tool's domain of interaction is closed.\nFor example, the world of a web search tool is open, whereas that\nof a memory tool is not.\n\nDefault: true"
} ,
"readOnlyHint" : {
"type" : "boolean" ,
"description" : "If true, the tool does not modify its environment.\n\nDefault: false"
} ,
"title" : {
"type" : "string" ,
"description" : "A human-readable title for the tool." ,
"nullable" : true
}
}
} ,
2025-04-08 09:47:29 -07:00
"ToolInfo" : {
"type" : "object" ,
"description" : "Information about the tool used for building prompts" ,
"required" : [
"name" ,
"description" ,
"parameters"
] ,
"properties" : {
"description" : {
"type" : "string"
} ,
"name" : {
"type" : "string"
} ,
"parameters" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"permission" : {
"allOf" : [
{
"$ref" : "#/components/schemas/PermissionLevel"
}
] ,
"nullable" : true
}
}
} ,
2025-04-11 12:19:08 -07:00
"ToolPermission" : {
"type" : "object" ,
"required" : [
"tool_name" ,
"permission"
] ,
"properties" : {
"permission" : {
"$ref" : "#/components/schemas/PermissionLevel"
} ,
"tool_name" : {
"type" : "string" ,
"description" : "Unique identifier and name of the tool, format <extension_name>__<tool_name>"
}
}
} ,
2025-02-13 13:50:02 -05:00
"UpsertConfigQuery" : {
"type" : "object" ,
"required" : [
"key" ,
2025-03-10 09:51:54 -07:00
"value" ,
"is_secret"
2025-02-13 13:50:02 -05:00
] ,
"properties" : {
"is_secret" : {
2025-03-10 09:51:54 -07:00
"type" : "boolean"
2025-02-13 13:50:02 -05:00
} ,
"key" : {
"type" : "string"
} ,
"value" : { }
}
2025-04-11 12:19:08 -07:00
} ,
"UpsertPermissionsQuery" : {
"type" : "object" ,
"required" : [
"tool_permissions"
] ,
"properties" : {
"tool_permissions" : {
"type" : "array" ,
"items" : {
"$ref" : "#/components/schemas/ToolPermission"
}
}
}
2025-02-13 13:50:02 -05:00
}
}
}
}