Skip to content

Add per-surface MCP tool exposure controls - #36781

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/12dfcb78bb5c5ecf4d70f38a8b5022792463a27f
Aug 3, 2026
Merged

Add per-surface MCP tool exposure controls#36781
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/12dfcb78bb5c5ecf4d70f38a8b5022792463a27f

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 3, 2026

Copy link
Copy Markdown

Add per-surface MCP tool exposure controls

Why

MCP tools can be exposed directly, discovered through tool search, or called
from Code Mode. Servers need to be able to opt out of any of these surfaces
without disabling their tools everywhere.

What changed

  • Add omit_tools_from to MCP server configuration, accepting any combination
    of direct, deferred, and code_mode.
  • Apply the exclusions independently when building direct, deferred, and Code
    Mode tool surfaces while keeping omitted tools registered for permitted uses.
  • Remove client-private _meta fields from MCP results returned to Code Mode.
  • Include the new setting in the configuration schema and MCP config
    serialization.

Testing

  • Cover every exposure combination across Code Mode, Code-Mode-only sessions,
    tool search, direct-only namespaces, and prefixed and unprefixed MCP names.
  • Verify direct and nested execution paths, parallel-call support, config
    round-tripping, and _meta filtering.

## Why

MCP tools can be exposed directly, discovered through tool search, or called
from Code Mode. Servers need to be able to opt out of any of these surfaces
without disabling their tools everywhere.

## What changed

- Add `omit_tools_from` to MCP server configuration, accepting any combination
  of `direct`, `deferred`, and `code_mode`.
- Apply the exclusions independently when building direct, deferred, and Code
  Mode tool surfaces while keeping omitted tools registered for permitted uses.
- Remove client-private `_meta` fields from MCP results returned to Code Mode.
- Include the new setting in the configuration schema and MCP config
  serialization.

## Testing

- Cover every exposure combination across Code Mode, Code-Mode-only sessions,
  tool search, direct-only namespaces, and prefixed and unprefixed MCP names.
- Verify direct and nested execution paths, parallel-call support, config
  round-tripping, and `_meta` filtering.

GitOrigin-RevId: 12dfcb78bb5c5ecf4d70f38a8b5022792463a27f
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/12dfcb78bb5c5ecf4d70f38a8b5022792463a27f branch from c2d60d2 to 51c9ed6 Compare August 3, 2026 18:52
@copyberry
copyberry Bot merged commit 51c9ed6 into main Aug 3, 2026
40 of 43 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/12dfcb78bb5c5ecf4d70f38a8b5022792463a27f branch August 3, 2026 18:54
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant