Skip to main content
Glama

export_graph

Idempotent

Exports a self-contained offline HTML report of a symbol's blast radius or a file's imports and dependents, so you can open it or attach it to a PR; returns the output path.

Instructions

Write a self-contained offline HTML view of a symbol's blast radius (mode=symbol) or a file's imports and dependents (mode=module), for a human to open or attach to a PR. Returns the file path.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": "<target>"
    },
    "name": "export_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNoOutput path; default: the reports dir.
modeNosymbol | module.symbol
depthNoHops for symbol mode (1-6).
sourceNoSource name. Omit when only one source applies.
targetYesSymbol (mode=symbol) or file path / fragment (mode=module).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.12.0
    • removedInput schema / properties / out / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / out / default
      Removed value: -null
    • addedInput schema / properties / out / type
      Added value: +"string"
    • removedInput schema / properties / source / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / source / default
      Removed value: -null
    • addedInput schema / properties / source / type
      Added value: +"string"
  2. Addedv1.9.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the write profile is known; the description adds that the output is a single self-contained, offline HTML file written to a path it returns. That is useful beyond the annotations, though it omits whether an existing file at `out` is overwritten and whether missing directories are created.

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?

One dense sentence with the artifact type front-loaded, the two modes bracketed inline, and the return value last. Every clause carries information; there is no filler or restatement of the tool name.

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

Completeness4/5

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

For a five-parameter tool with full schema coverage and no output schema, the definition covers the artifact form, both modes, and the return value, which is enough to call it correctly. The remaining gap is mutation edge cases: overwrite behavior at the default reports directory and permission/error outcomes when writing.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description does add meaning the schema lacks by tying mode=symbol to "blast radius" and mode=module to "imports and dependents", clarifying what each enum value actually yields, but it says nothing further about depth, source, or out beyond the schema.

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?

States a specific verb and artifact ("Write a self-contained offline HTML view") plus the two distinct scopes it covers, symbol blast radius vs file imports/dependents, and the return value (file path). An agent can tell this produces a human-facing report rather than a query result, distinguishing it from query-style siblings.

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

Usage Guidelines3/5

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

The phrase "for a human to open or attach to a PR" gives a clear usage context, which implies this is the artifact-producing option when a person needs to review impact. However, it never states when not to use it or names any alternative for machine-readable graph data, so selection is implied rather than directed.

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