GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(mcp): accept omitted arguments for argument-free tools by autoantohaki · Pull Request #1 · impossibleG/impossible-ocr

Conversation

@autoantohaki

@autoantohaki autoantohaki commented Oct 21, 2026

Copy link
Copy Markdown
Member

Requested by mau

Before: an MCP tools/call for ocr_capabilities or ocr_models that omitted arguments came back as a -32602 "unknown tool" error. MCP marks arguments as optional, and both tools take no input, so this is a valid call. Passing unexpected arguments also reported "unknown tool".

After: if arguments is missing, null, or {}, both tools return their normal result. If arguments are passed to these tools, the error is -32602 "invalid params", and a truly unknown tool name still reports "unknown tool".

How: is_empty_object becomes is_empty_arguments, which also accepts null, and the match arm for unexpected arguments is now separate from the unknown-tool fallback. A new test covers HTTP MCP calls with omitted, empty and non-empty arguments, plus an unknown tool name.

Note: this PR changes .rs sources, so the Windows runtime qualification attestation has to be re-recorded before verify-runtime-qualification-attestation.ps1 passes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@autoantohaki
fix(mcp): accept omitted arguments for argument-free tools
c536d93
MCP makes tools/call arguments optional, but ocr_capabilities and
ocr_models only matched an explicit empty object. A call without
arguments fell through to "unknown tool". Treat a missing value as no
arguments, and report unexpected arguments on these tools as invalid
params instead of an unknown tool.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@autoantohaki
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.