mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Inspecting one MCP server should not require full-inventory discovery or a separate connection when a thread already has one. ## What changed - Add optional `serverName` to `mcpServerStatus/list` and update generated schemas and bindings. - With `threadId`, apply any pending runtime refresh and reuse the thread's current connection and tool catalog, waiting only for the selected server during discovery. - Without `threadId`, create a discovery connection for only the selected server. Unknown names return an empty page; omitting `serverName` preserves full-inventory discovery. ## Testing Add a regression test covering both status detail modes, checking that tool metadata is preserved and that status reads do not repeat `initialize` or `tools/list` requests. GitOrigin-RevId: 1b361b67a993ab45cae493e88c146f50cfaf753a
56 lines
1.2 KiB
JSON
Generated
56 lines
1.2 KiB
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"McpServerStatusDetail": {
|
|
"enum": [
|
|
"full",
|
|
"toolsAndAuthOnly"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"properties": {
|
|
"cursor": {
|
|
"description": "Opaque pagination cursor returned by a previous call.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"detail": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/McpServerStatusDetail"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Controls how much MCP inventory data to fetch for each server. Defaults to `Full` when omitted."
|
|
},
|
|
"limit": {
|
|
"description": "Optional page size; defaults to a server-defined value.",
|
|
"format": "uint32",
|
|
"minimum": 0.0,
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"serverName": {
|
|
"description": "Limit discovery to one server. With a thread ID, reuse that thread's MCP connection.",
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"threadId": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"title": "ListMcpServerStatusParams",
|
|
"type": "object"
|
|
} |