Simplify MCP tool wait behavior/parameters#119
Merged
nathanjcochran merged 2 commits intomainfrom Dec 2, 2025
Merged
Conversation
murrayju
approved these changes
Dec 2, 2025
Member
murrayju
left a comment
There was a problem hiding this comment.
didn't test, but looks good to me
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.
This PR follows up on this suggestion from @Askir.
Specifically, it removes the
timeout_minutesparameter from all of theservice_*MCP tools that previously accepted it. Instead, the wait timeout (which only applies when thewaitparameter istrue) is now hard-coded to 10 minutes, which should be plenty of time for the vast majority of service creation/fork/start/stop operations, except for extreme outliers. I considered setting it to something higher (e.g. 30 minutes), but I doubt anyone actually wants their AI agent to be stuck waiting for much longer than 10 minutes anyways (and even when it times out, the LLM can make subsequentservice_getcalls to check the service status).Fwiw, I did consider the alternative approach of getting rid of the
waitparameter instead, and simply having a non-nulltimeout_minutesmean that it should wait (as suggested by @syvb here). However, that would require the LLM to pick a timeout value in order to trigger the waiting behavior, and I don't think LLMs really have the context necessary to make a good decision, at least in the vast majority of circumstances (since they don't know what the typical duration for each operation is, and users almost certainly aren't saying things like "I'm only willing to wait for X minutes" when they trigger these tool calls). So rather than forcing LLMs to make a random guess about how long to wait for, or trying to include a bunch of context so they can make an informed decision, I decided that a simple booleanwaitparameter is probably easiest and least likely to cause issues.I also cleaned up some duplicate information in the tool descriptions. We were previously describing the wait behavior both in the main tool description, as well as in the
waitparameter description, which seemed unnecessary and wasteful of tokens (especially that we now have four tools that accept that parameter). So I simplified things by moving the information into thewaitparameter description only, and eliminating it from the main tool description. Claude still seems to understand how it works just fine.Closes AGE-272