mirror of
https://github.com/openai/codex.git
synced 2026-10-19 16:17:49 +00:00
Add single-server MCP status discovery with thread connection reuse (#48783)
## 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
This commit is contained in:
@@ -8469,6 +8469,13 @@ class ListMcpServerStatusParams(BaseModel):
|
||||
int | None,
|
||||
Field(description="Optional page size; defaults to a server-defined value.", ge=0),
|
||||
] = None
|
||||
server_name: Annotated[
|
||||
str | None,
|
||||
Field(
|
||||
alias="serverName",
|
||||
description="Limit discovery to one server. With a thread ID, reuse that thread's MCP connection.",
|
||||
),
|
||||
] = None
|
||||
thread_id: Annotated[str | None, Field(alias="threadId")] = None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user