Skip to content

Commit 04e554c

Browse files
committed
feat: reuse previous mcp tool listings where possible
Signed-off-by: Gordon Sim <[email protected]>
1 parent 7ec7e0c commit 04e554c

File tree

12 files changed

+1826
-946
lines changed

12 files changed

+1826
-946
lines changed

docs/static/deprecated-llama-stack-spec.html

Lines changed: 240 additions & 153 deletions
Large diffs are not rendered by default.

docs/static/deprecated-llama-stack-spec.yaml

Lines changed: 175 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -6595,6 +6595,122 @@ components:
65956595
title: OpenAIResponseInputMessageContentText
65966596
description: >-
65976597
Text content for input messages in OpenAI response format.
6598+
OpenAIResponseInputToolFileSearch:
6599+
type: object
6600+
properties:
6601+
type:
6602+
type: string
6603+
const: file_search
6604+
default: file_search
6605+
description: >-
6606+
Tool type identifier, always "file_search"
6607+
vector_store_ids:
6608+
type: array
6609+
items:
6610+
type: string
6611+
description: >-
6612+
List of vector store identifiers to search within
6613+
filters:
6614+
type: object
6615+
additionalProperties:
6616+
oneOf:
6617+
- type: 'null'
6618+
- type: boolean
6619+
- type: number
6620+
- type: string
6621+
- type: array
6622+
- type: object
6623+
description: >-
6624+
(Optional) Additional filters to apply to the search
6625+
max_num_results:
6626+
type: integer
6627+
default: 10
6628+
description: >-
6629+
(Optional) Maximum number of search results to return (1-50)
6630+
ranking_options:
6631+
type: object
6632+
properties:
6633+
ranker:
6634+
type: string
6635+
description: >-
6636+
(Optional) Name of the ranking algorithm to use
6637+
score_threshold:
6638+
type: number
6639+
default: 0.0
6640+
description: >-
6641+
(Optional) Minimum relevance score threshold for results
6642+
additionalProperties: false
6643+
description: >-
6644+
(Optional) Options for ranking and scoring search results
6645+
additionalProperties: false
6646+
required:
6647+
- type
6648+
- vector_store_ids
6649+
title: OpenAIResponseInputToolFileSearch
6650+
description: >-
6651+
File search tool configuration for OpenAI response inputs.
6652+
OpenAIResponseInputToolFunction:
6653+
type: object
6654+
properties:
6655+
type:
6656+
type: string
6657+
const: function
6658+
default: function
6659+
description: Tool type identifier, always "function"
6660+
name:
6661+
type: string
6662+
description: Name of the function that can be called
6663+
description:
6664+
type: string
6665+
description: >-
6666+
(Optional) Description of what the function does
6667+
parameters:
6668+
type: object
6669+
additionalProperties:
6670+
oneOf:
6671+
- type: 'null'
6672+
- type: boolean
6673+
- type: number
6674+
- type: string
6675+
- type: array
6676+
- type: object
6677+
description: >-
6678+
(Optional) JSON schema defining the function's parameters
6679+
strict:
6680+
type: boolean
6681+
description: >-
6682+
(Optional) Whether to enforce strict parameter validation
6683+
additionalProperties: false
6684+
required:
6685+
- type
6686+
- name
6687+
title: OpenAIResponseInputToolFunction
6688+
description: >-
6689+
Function tool configuration for OpenAI response inputs.
6690+
OpenAIResponseInputToolWebSearch:
6691+
type: object
6692+
properties:
6693+
type:
6694+
oneOf:
6695+
- type: string
6696+
const: web_search
6697+
- type: string
6698+
const: web_search_preview
6699+
- type: string
6700+
const: web_search_preview_2025_03_11
6701+
default: web_search
6702+
description: Web search tool type variant to use
6703+
search_context_size:
6704+
type: string
6705+
default: medium
6706+
description: >-
6707+
(Optional) Size of search context, must be "low", "medium", or "high"
6708+
additionalProperties: false
6709+
required:
6710+
- type
6711+
title: OpenAIResponseInputToolWebSearch
6712+
description: >-
6713+
Web search tool configuration for OpenAI response inputs.
65986714
OpenAIResponseMCPApprovalRequest:
65996715
type: object
66006716
properties:
@@ -6736,6 +6852,12 @@ components:
67366852
type: number
67376853
description: >-
67386854
(Optional) Nucleus sampling parameter used for generation
6855+
tools:
6856+
type: array
6857+
items:
6858+
$ref: '#/components/schemas/OpenAIResponseTool'
6859+
description: >-
6860+
(Optional) An array of tools the model may call while generating a response.
67396861
truncation:
67406862
type: string
67416863
description: >-
@@ -7088,123 +7210,81 @@ components:
70887210
title: OpenAIResponseText
70897211
description: >-
70907212
Text response configuration for OpenAI responses.
7091-
ResponseShieldSpec:
7092-
type: object
7093-
properties:
7094-
type:
7095-
type: string
7096-
description: The type/identifier of the shield.
7097-
additionalProperties: false
7098-
required:
7099-
- type
7100-
title: ResponseShieldSpec
7101-
description: >-
7102-
Specification for a shield to apply during response generation.
7103-
OpenAIResponseInputTool:
7213+
OpenAIResponseTool:
71047214
oneOf:
71057215
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
71067216
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
71077217
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
7108-
- $ref: '#/components/schemas/OpenAIResponseInputToolMCP'
7218+
- $ref: '#/components/schemas/OpenAIResponseToolMCP'
71097219
discriminator:
71107220
propertyName: type
71117221
mapping:
71127222
web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch'
71137223
file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch'
71147224
function: '#/components/schemas/OpenAIResponseInputToolFunction'
7115-
mcp: '#/components/schemas/OpenAIResponseInputToolMCP'
7116-
OpenAIResponseInputToolFileSearch:
7225+
mcp: '#/components/schemas/OpenAIResponseToolMCP'
7226+
OpenAIResponseToolMCP:
71177227
type: object
71187228
properties:
71197229
type:
71207230
type: string
7121-
const: file_search
7122-
default: file_search
7123-
description: >-
7124-
Tool type identifier, always "file_search"
7125-
vector_store_ids:
7126-
type: array
7127-
items:
7128-
type: string
7129-
description: >-
7130-
List of vector store identifiers to search within
7131-
filters:
7132-
type: object
7133-
additionalProperties:
7134-
oneOf:
7135-
- type: 'null'
7136-
- type: boolean
7137-
- type: number
7138-
- type: string
7139-
- type: array
7140-
- type: object
7141-
description: >-
7142-
(Optional) Additional filters to apply to the search
7143-
max_num_results:
7144-
type: integer
7145-
default: 10
7146-
description: >-
7147-
(Optional) Maximum number of search results to return (1-50)
7148-
ranking_options:
7149-
type: object
7150-
properties:
7151-
ranker:
7152-
type: string
7153-
description: >-
7154-
(Optional) Name of the ranking algorithm to use
7155-
score_threshold:
7156-
type: number
7157-
default: 0.0
7231+
const: mcp
7232+
default: mcp
7233+
description: Tool type identifier, always "mcp"
7234+
server_label:
7235+
type: string
7236+
description: Label to identify this MCP server
7237+
allowed_tools:
7238+
oneOf:
7239+
- type: array
7240+
items:
7241+
type: string
7242+
- type: object
7243+
properties:
7244+
tool_names:
7245+
type: array
7246+
items:
7247+
type: string
7248+
description: >-
7249+
(Optional) List of specific tool names that are allowed
7250+
additionalProperties: false
7251+
title: AllowedToolsFilter
71587252
description: >-
7159-
(Optional) Minimum relevance score threshold for results
7160-
additionalProperties: false
7253+
Filter configuration for restricting which MCP tools can be used.
71617254
description: >-
7162-
(Optional) Options for ranking and scoring search results
7255+
(Optional) Restriction on which tools can be used from this server
71637256
additionalProperties: false
71647257
required:
71657258
- type
7166-
- vector_store_ids
7167-
title: OpenAIResponseInputToolFileSearch
7259+
- server_label
7260+
title: OpenAIResponseToolMCP
71687261
description: >-
7169-
File search tool configuration for OpenAI response inputs.
7170-
OpenAIResponseInputToolFunction:
7262+
Model Context Protocol (MCP) tool configuration for OpenAI response object.
7263+
ResponseShieldSpec:
71717264
type: object
71727265
properties:
71737266
type:
71747267
type: string
7175-
const: function
7176-
default: function
7177-
description: Tool type identifier, always "function"
7178-
name:
7179-
type: string
7180-
description: Name of the function that can be called
7181-
description:
7182-
type: string
7183-
description: >-
7184-
(Optional) Description of what the function does
7185-
parameters:
7186-
type: object
7187-
additionalProperties:
7188-
oneOf:
7189-
- type: 'null'
7190-
- type: boolean
7191-
- type: number
7192-
- type: string
7193-
- type: array
7194-
- type: object
7195-
description: >-
7196-
(Optional) JSON schema defining the function's parameters
7197-
strict:
7198-
type: boolean
7199-
description: >-
7200-
(Optional) Whether to enforce strict parameter validation
7268+
description: The type/identifier of the shield.
72017269
additionalProperties: false
72027270
required:
72037271
- type
7204-
- name
7205-
title: OpenAIResponseInputToolFunction
7272+
title: ResponseShieldSpec
72067273
description: >-
7207-
Function tool configuration for OpenAI response inputs.
7274+
Specification for a shield to apply during response generation.
7275+
OpenAIResponseInputTool:
7276+
oneOf:
7277+
- $ref: '#/components/schemas/OpenAIResponseInputToolWebSearch'
7278+
- $ref: '#/components/schemas/OpenAIResponseInputToolFileSearch'
7279+
- $ref: '#/components/schemas/OpenAIResponseInputToolFunction'
7280+
- $ref: '#/components/schemas/OpenAIResponseInputToolMCP'
7281+
discriminator:
7282+
propertyName: type
7283+
mapping:
7284+
web_search: '#/components/schemas/OpenAIResponseInputToolWebSearch'
7285+
file_search: '#/components/schemas/OpenAIResponseInputToolFileSearch'
7286+
function: '#/components/schemas/OpenAIResponseInputToolFunction'
7287+
mcp: '#/components/schemas/OpenAIResponseInputToolMCP'
72087288
OpenAIResponseInputToolMCP:
72097289
type: object
72107290
properties:
@@ -7286,30 +7366,6 @@ components:
72867366
title: OpenAIResponseInputToolMCP
72877367
description: >-
72887368
Model Context Protocol (MCP) tool configuration for OpenAI response inputs.
7289-
OpenAIResponseInputToolWebSearch:
7290-
type: object
7291-
properties:
7292-
type:
7293-
oneOf:
7294-
- type: string
7295-
const: web_search
7296-
- type: string
7297-
const: web_search_preview
7298-
- type: string
7299-
const: web_search_preview_2025_03_11
7300-
default: web_search
7301-
description: Web search tool type variant to use
7302-
search_context_size:
7303-
type: string
7304-
default: medium
7305-
description: >-
7306-
(Optional) Size of search context, must be "low", "medium", or "high"
7307-
additionalProperties: false
7308-
required:
7309-
- type
7310-
title: OpenAIResponseInputToolWebSearch
7311-
description: >-
7312-
Web search tool configuration for OpenAI response inputs.
73137369
CreateOpenaiResponseRequest:
73147370
type: object
73157371
properties:
@@ -7410,6 +7466,12 @@ components:
74107466
type: number
74117467
description: >-
74127468
(Optional) Nucleus sampling parameter used for generation
7469+
tools:
7470+
type: array
7471+
items:
7472+
$ref: '#/components/schemas/OpenAIResponseTool'
7473+
description: >-
7474+
(Optional) An array of tools the model may call while generating a response.
74137475
truncation:
74147476
type: string
74157477
description: >-

0 commit comments

Comments
 (0)