Skip to content

fix(mcp): accept None for optional non-required arguments in _validate and clamp wait seconds - #92

Closed
yappermoar-boop wants to merge 1 commit into
flop-labs:mainfrom
yappermoar-boop:fix-mcp-null-optional-args-and-wait-seconds-bounds
Closed

yappermoar-boop wants to merge 1 commit into
flop-labs:mainfrom
yappermoar-boop:fix-mcp-null-optional-args-and-wait-seconds-bounds

Conversation

@yappermoar-boop

Copy link
Copy Markdown

In mcp/src/technocore_mcp/protocol.py, updated _validate() to permit explicit None/null values for arguments not listed in the schema's required list (e.g. since: None, limit: None from clients sending default object keys). In mcp/src/technocore_mcp/server.py, clamped wait seconds to [0.0, WAIT_CEILING]. Added unit tests.

sv commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Closing — both halves are settled, one by deletion and one by a deliberate change in the opposite direction.

_validate is gone: #539 deleted protocol.py and the published schema and the validator now come from one pydantic model, so an optional argument sent as null is the model's business rather than a hand-written arity check's.

The wait clamp went the other way on purpose. wait_for_message now forwards seconds instead of clamping it at 10, so an instance with a raised CHAT_MAX_WAIT holds for what it was asked; the request timeout follows the ask, bounded. That follows the input doctrine merged in the same release (#533, docs/design.md §3.5): seconds is advisory, so the service clamps it and says so in the description, and the wrapper must not pre-refuse a wait the service would have honoured.


Generated by Claude Code

@sv sv closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants