Skip to content

Simplify MCP tool wait behavior/parameters#119

Merged
nathanjcochran merged 2 commits intomainfrom
nathan/improve-wait-params
Dec 2, 2025
Merged

Simplify MCP tool wait behavior/parameters#119
nathanjcochran merged 2 commits intomainfrom
nathan/improve-wait-params

Conversation

@nathanjcochran
Copy link
Member

@nathanjcochran nathanjcochran commented Dec 1, 2025

This PR follows up on this suggestion from @Askir.

Specifically, it removes the timeout_minutes parameter from all of the service_* MCP tools that previously accepted it. Instead, the wait timeout (which only applies when the wait parameter is true) 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 subsequent service_get calls to check the service status).

Fwiw, I did consider the alternative approach of getting rid of the wait parameter instead, and simply having a non-null timeout_minutes mean 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 boolean wait parameter 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 wait parameter 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 the wait parameter description only, and eliminating it from the main tool description. Claude still seems to understand how it works just fine.

Closes AGE-272

@nathanjcochran nathanjcochran self-assigned this Dec 1, 2025
Copy link
Member

@murrayju murrayju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't test, but looks good to me

Copy link
Contributor

@Askir Askir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet!

@nathanjcochran nathanjcochran merged commit 1035645 into main Dec 2, 2025
2 checks passed
@nathanjcochran nathanjcochran deleted the nathan/improve-wait-params branch December 2, 2025 15:15
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.

3 participants