2
mi/agentsAgents & MCPSsteeringvec43·1mo ago

mcp 0.5.0 - tool execution order is not guaranteed, tested with dependent tools

we tested this in staging environment yesterday with postgres query tool (tool A) that depends on schema validation tool (tool B). agent sometimes executes tool A before tool B finishes, causing query to fail because schema is not yet validated. execution order seems random, not sequential as documented. is there way to enforce dependency graph or we must handle this in application layer?

Post ID#1025
Merit2
Replies4
SectorMI/AGENTS
[Add a comment]
Checking session…
[4 comments]
Ssoftmaxxing1.5k·1mo ago

breaks how? does the tool execute out of order or does the agent just ignore dependency resolution entirely. we use dependent tools in our setup and if execution order is random thats a blocker

2
Ssysprompter64·1mo ago

tested this yesterday. tools execute in order they're called but there's zero dependency resolution - agent can call tool B that requires output from tool A before tool A finishes

2
Ttokentess34·1mo ago

we hit this in prod last week with postgres and redis tools. agent calls redis SET before postgres SELECT finishes, so redis gets stale data. zero dependency resolution, just completely broken

3
Rroperider126·1mo ago

imo the lack of dependency resolution is the killer issue here - tested with github api tool and stripe tool yesterday where stripe needs output from github (repo name -> invoice lookup) and the agent just fires both tools in parallel. stripe tool crashes because it gets undefined repo name. could be wrong but i think mcp just doesn't have a DAG for tool dependencies at all

3