Skip to content

0xMayurrr/Tool-Dependency-Graph

Repository files navigation

Tool Dependency Graph — by Mayur P

hey! I'm Mayur, I come from a Web3 background and this is my submission for the Composio tool dependency graph assignment.

Web3 taught me to think in terms of what needs to happen before what — like how you need to approve a token before you can swap it, or fetch a wallet address before you can send funds. that same mental model clicked perfectly here with agentic tool execution.


what I built

a visual dependency graph for 442 Google Super tools and 867 GitHub tools from Composio.

the core idea is simple — when an AI agent runs tools, some tools need outputs from other tools before they can execute. this project maps all those relationships and visualizes them so you can see the full picture.

for example:

  • you can't reply to a Gmail thread without a thread_id → so LIST_THREADS must run first
  • you can't merge a PR without a pull_number → so LIST_PULL_REQUESTS must run first

how to run

# 1. install dependencies
bun install

# 2. fetch all tools from Composio
bun src/index.ts

# 3. build the dependency graph
bun src/build-graph.ts

# 4. open graph.html in your browser

how I figured out the dependencies

each tool has inputParameters with required fields like thread_id, file_id, repo, owner etc.

the key insight:

if tool A needs a thread_id as input, and tool B produces a thread_id as output → B must run before A

so I built a map of 35+ common parameter types to the tools that provide them. then for every tool I checked its required inputs and drew an arrow from the provider tool to it.

this is similar to how in Web3 you map out contract dependencies — contract A needs an address from contract B, so B deploys first.


real example chains

reply to a Gmail thread

GOOGLESUPER_LIST_THREADS
        │ (thread_id)
        ▼
GOOGLESUPER_REPLY_TO_THREAD

send email to a contact by name

GOOGLESUPER_SEARCH_CONTACTS
        │ (email)theriyuthu 
        
        ▼
GOOGLESUPER_SEND_EMAIL

comment on a GitHub issue

GITHUB_LIST_REPOS_FOR_AUTHENTICATED_USER
        │ (repo, owner)
        ▼
GITHUB_LIST_REPO_ISSUES
        │ (issue_number)
        ▼
GITHUB_CREATE_AN_ISSUE_COMMENT

merge a pull request

GITHUB_LIST_REPOS_FOR_AUTHENTICATED_USER
        │ (repo, owner)
        ▼
GITHUB_LIST_PULL_REQUESTS
        │ (pull_number)
        ▼
GITHUB_MERGE_A_PULL_REQUEST

delete a Gmail draft

GOOGLESUPER_LIST_DRAFTS
        │ (draft_id)
        ▼
GOOGLESUPER_DELETE_DRAFT

what the graph shows

  • every box = a tool
  • every arrow = a dependency (this tool needs that tool to run first)
  • blue nodes = Google Super tools
  • green nodes = GitHub tools

interactive features

  • search bar — type any tool name, get a dropdown, click to jump to it
  • filter buttons — toggle between Google / GitHub / All
  • click any node — see what it needs (blue) and what it enables (green)
  • example chains — 7 pre-built real world flows you can click to highlight in the graph

stats

  • 442 Google Super tools
  • 867 GitHub tools
  • 35+ dependency parameter types mapped
  • 1309 total tools visualized

built by Mayur P — mayurkarthick2006@gmail.com

About

"Tool Dependency Graph for Composio's agentic tool ecosystem "

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors