Skip to content

feat(agent): budget model-visible MCP schemas - #5388

Draft
dajiaohuang wants to merge 1 commit into
HKUDS:mainfrom
dajiaohuang:draft/5298-mcp-schema-budget
Draft

feat(agent): budget model-visible MCP schemas#5388
dajiaohuang wants to merge 1 commit into
HKUDS:mainfrom
dajiaohuang:draft/5298-mcp-schema-budget

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Summary

  • add an opt-in byte budget for model-visible MCP tool schemas, disabled by default
  • preserve every built-in tool and leave the registered/executable MCP tool set unchanged
  • choose a deterministic MCP subset from the latest visible user request and keep it stable for the run
  • fail open to all MCP schemas when intent is ambiguous, schemas are malformed, or the strongest match cannot fit

Draft scope

This draft explores the conservative budgeted-view option from the issue without adding another model, embedding, or discovery call. The ASCII lexical matcher intentionally fails open for non-English or ambiguous turns; disabling the setting restores existing behavior.

Relates to #5298.

Validation

  • focused runner, configuration, and selector tests: 129 passed
  • Ruff: passed
  • BasedPyright: 0 errors, 0 warnings, 0 notes
  • full suite before the final exact-byte adjustment: 6372 passed, 48 skipped, with 5 unrelated Windows/date-boundary baseline failures; the focused suite, Ruff, and BasedPyright were rerun after that adjustment
  • git diff --check: 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.

1 participant