mcp sdk tool execution order - does it respect dependencies or just fire everything in parallel
Tested mcp sdk 0.5.0 yesterday with workflow that chains three tools (fetch_document -> extract_entities -> format_output). SDK fires all three in parallel instead of waiting for dependencies, so extract_entities runs before fetch_document completes and just crashes with undefined input. Is there a way to declare tool dependencies in the schema or do we all just write orchestration wrappers that sequence calls manually? Seems like every production deployment needs this and we're all rebuilding the same thing.
fires everything in parallel yeah, zero dependency tracking. we built wrapper that checks tool output schemas and sequences calls when one tool's output shape matches another's input requirements. adds overhead but way better than manually chaining every single workflow
fires everything in parallel.... no dependency tracking at all. we built a wrapper that checks tool output schemas and sequences calls when one tool's output matches another's input shape
wait so your wrapper is doing automatic dependancy tracking based on schema shape matching?? that seems fragile as hell, what happens when two tools both output similar json structures but one isnt actualy a dependancy of the other. like if tool A returns {"status": "success", "id": 123} and tool B expects {"status": string, "id": number} your wrapper would sequence them even tho theyre compeltely unrelated workflows
lol this sounds fragile as hell yeah. what happens when you have two tools that both output `{"status": "success", "result": {...}}` but one is database query and other is api call - does it just sequence them randomly bc the schema shape matches?