feat(api): add readonly connectors API (#4258)

# What does this PR do?
Adds a new API for connectors and MCP registry support along with
required types.
Does not include any implementation for it

<!-- If resolving an issue, uncomment and update the line below -->
Closes #4235 and #4061 (partially)

## Test Plan
no tests included

---------

Signed-off-by: Jaideep Rao <jrao@redhat.com>
Co-authored-by: Francisco Javier Arceo <arceofrancisco@gmail.com>
This commit is contained in:
Jaideep Rao 2025-12-11 23:49:55 +05:30 committed by GitHub
parent 470fe55e87
commit 76e47d811a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1343 additions and 137 deletions

View file

@ -8634,6 +8634,66 @@ components:
- chunk_id
title: Chunk
description: A chunk of content that can be inserted into a vector database.
Connector:
properties:
identifier:
type: string
title: Identifier
description: Unique identifier for this resource in llama stack
provider_resource_id:
anyOf:
- type: string
- type: 'null'
description: Unique identifier for this resource in the provider
provider_id:
type: string
title: Provider Id
description: ID of the provider that owns this resource
type:
type: string
const: connector
title: Type
default: connector
connector_type:
$ref: '#/components/schemas/ConnectorType'
default: mcp
connector_id:
type: string
title: Connector Id
description: Identifier for the connector
url:
type: string
title: Url
description: URL of the connector
server_label:
anyOf:
- type: string
- type: 'null'
description: Label of the server
server_name:
anyOf:
- type: string
- type: 'null'
description: Name of the server
server_description:
anyOf:
- type: string
- type: 'null'
description: Description of the server
type: object
required:
- identifier
- provider_id
- connector_id
- url
title: Connector
description: A connector resource representing a connector registered in Llama Stack.
ConnectorType:
type: string
enum:
- mcp
title: ConnectorType
description: Type of connector.
ConversationItemInclude:
type: string
enum:
@ -8724,6 +8784,30 @@ components:
- cancelled
title: JobStatus
description: Status of a job execution.
ListConnectorsResponse:
properties:
data:
items:
$ref: '#/components/schemas/Connector'
type: array
title: Data
type: object
required:
- data
title: ListConnectorsResponse
description: Response containing a list of connectors.
ListToolsResponse:
properties:
data:
items:
$ref: '#/components/schemas/ToolDef'
type: array
title: Data
type: object
required:
- data
title: ListToolsResponse
description: Response containing a list of tools.
MCPListToolsTool:
properties:
input_schema:
@ -9654,6 +9738,63 @@ components:
type: string
title: DialogType
type: object
ToolGroupInput:
description: Input data for registering a tool group.
properties:
toolgroup_id:
title: Toolgroup Id
type: string
provider_id:
title: Provider Id
type: string
args:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
nullable: true
mcp_endpoint:
anyOf:
- $ref: '#/components/schemas/URL'
title: URL
- type: 'null'
nullable: true
title: URL
required:
- toolgroup_id
- provider_id
title: ToolGroupInput
type: object
ConnectorInput:
description: Input for creating a connector
properties:
connector_type:
$ref: '#/components/schemas/ConnectorType'
default: mcp
connector_id:
description: Identifier for the connector
title: Connector Id
type: string
url:
description: URL of the connector
title: Url
type: string
server_label:
anyOf:
- type: string
- type: 'null'
description: Label of the server
nullable: true
type:
const: connector
default: connector
title: Type
type: string
required:
- connector_id
- url
title: ConnectorInput
type: object
ConversationMessage:
description: OpenAI-compatible message item for conversations.
properties:
@ -9738,33 +9879,6 @@ components:
- items
title: ConversationItemCreateRequest
type: object
ToolGroupInput:
description: Input data for registering a tool group.
properties:
toolgroup_id:
title: Toolgroup Id
type: string
provider_id:
title: Provider Id
type: string
args:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
nullable: true
mcp_endpoint:
anyOf:
- $ref: '#/components/schemas/URL'
title: URL
- type: 'null'
nullable: true
title: URL
required:
- toolgroup_id
- provider_id
title: ToolGroupInput
type: object
Api:
description: Enumeration of all available APIs in the Llama Stack system.
enum:
@ -9789,6 +9903,7 @@ components:
- files
- prompts
- conversations
- connectors
- inspect
title: Api
type: string