Skip to main content
Glama

build_graph

Idempotent

Builds or refreshes the repository code graph other wingbox tools read, returning a log of languages, modules, dependencies, and graph location; run it first and after large edits.

Instructions

Builds or refreshes the code graph of the repository and returns the build log: the files found per language, the number of modules and dependencies, and where the graph was written. Use it first in a repository and again after large edits: every other tool reads the graph it writes, and says so when the graph is missing. It is not needed before each question: every tool first brings the graph up to date with the files changed since the build. Only changed files are parsed again; full: true parses every file, and exclude_dirs names folders to leave out, by folder name. It writes the folder .wingbox/ in the repository and nothing else.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "build_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
fullNoReparse every file instead of only changed ones.
exclude_dirsNoDirectory names to skip, e.g. ["generated"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses the side effect precisely (writes the .wingbox/ folder "and nothing else"), the incremental parse behavior, and how full/exclude_dirs change that behavior. This tells the agent exactly what state changes and what the cost trade-off is, which the annotations alone (readOnlyHint=false, idempotentHint=true) do not convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence carries distinct, non-redundant information, ordered from what the tool does, to return value, to when to call it, to what it costs, to what it writes. There is no filler and the important guidance is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a build/indexing tool with no output schema, the description covers the return payload, the side effects, the incremental behavior, and the parameter effects. An agent has everything needed to decide whether and with which arguments to call it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents both parameters and a baseline of 3 applies. The description adds genuine meaning: full=true means every file is reparsed, and exclude_dirs matches "by folder name" rather than path, which clarifies matching semantics beyond the schema's bare "Directory names to skip".

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("builds or refreshes the code graph of the repository") and also states what is returned (the build log with per-language files, module/dependency counts, and output location). It positions the tool against its siblings by noting every other tool reads the graph it writes, so the agent can distinguish it without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ("Use it first in a repository and again after large edits"), explicit when-not ("It is not needed before each question: every tool first brings the graph up to date"), and an explanation of the alternative mechanism. This is the strongest form of routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.