Skip to content

test: add direct unit tests for _mcp_tool_metadata helpers#3102

Merged
seratch merged 1 commit intoopenai:mainfrom
Quratulain-bilal:test/mcp-tool-metadata-coverage
May 4, 2026
Merged

test: add direct unit tests for _mcp_tool_metadata helpers#3102
seratch merged 1 commit intoopenai:mainfrom
Quratulain-bilal:test/mcp-tool-metadata-coverage

Conversation

@Quratulain-bilal
Copy link
Copy Markdown
Contributor

The _mcp_tool_metadata module resolves MCP tool display metadata (title / description) from raw payloads
or attribute-bearing objects and feeds hosted-MCP definitions into the model and traces, but had no
direct test file. Adds 27 focused unit tests covering each helper's branches: explicit title preference,
annotation fallback, description-vs-title precedence for the model-facing string,
extract_mcp_tool_metadata, and collect_mcp_list_tools_metadata (including raw_item unwrapping, skipped
shapes, and last-entry-wins).

The _mcp_tool_metadata module resolves MCP tool display metadata
(title / description) from raw payloads or attribute-bearing objects
and feeds hosted-MCP definitions into the model and traces, but had
no direct test file. Adds 27 focused unit tests covering each
helper's branches: explicit title preference, annotation fallback,
description-vs-title precedence for the model-facing string,
extract_mcp_tool_metadata, and collect_mcp_list_tools_metadata
(including raw_item unwrapping, skipped shapes, and
last-entry-wins).
@seratch
Copy link
Copy Markdown
Member

seratch commented May 4, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch seratch merged commit 1b7d878 into openai:main May 4, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants