Repository navigation
Conversation
An argument a tool doesn't list in its input schema was ignored: a call with a misspelt name, or with an argument from a newer version, ran with the default and reported success. iphone_wait_for with state: "disappeared" answered that the text had appeared (#158). Each call is now checked against its tool's input schema before anything is done, and the error names the arguments the tool takes. A batch's steps are checked the same way; then in a step is refused (the batch's own then applies), and wait takes only seconds. The developer tools and iphone_confirm are checked against their own schemas. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
12 of 15 tasks
15 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #158.
Why
to_requestread the arguments it knew and silently dropped the rest. A misspelt argument, or one from a newer version, ran the call with the default and reported success. That is howiphone_wait_for {"state": "disappeared"}answered "appeared" in 0.31 s in #158:statedidn't exist, so it waited for the text to appear, and it was already on screen.What
iphone_wait_for 没有参数 state,什么都没做;它的参数:text、timeoutthen/then_filter/then_region/then_settleare only accepted where the schema lists them (action tools andiphone_batch).iphone_batchsteps are checked the same way, before any step runs.theninside a step is refused (the batch's ownthenapplies), andwaittakes onlyseconds.iphone_confirmare checked against their own schemas. A tool name this server doesn't know is left to the existing "unknown tool" error.to_requestreads is declared in its tool's schema.This is a behavior change for callers that passed extra arguments, so it's listed under Upgrade notes in both changelogs.
Tests
cargo test --workspace --all-features --locked,cargo clippy … -D warningsandcargo fmt --checkpass. New tests:unknown_arguments_are_refused,batch_steps_refuse_unknown_arguments.MCP_CMD=target/release/iphone-control mcp):tests/device/run.py: 16 calls, 0 failed. None of the existing calls is rejected.tests/device/scenarios.py(all exceptlock/url): 43 checks, 0 failed.#159 adds
statetoiphone_wait_for. Whichever of the two merges second needs a trivial rebase. With both merged,statepasses this check because it's in the schema.🤖 Generated with Claude Code