Skip to main content
Glama

Render (layout spec)

codetopo_render
Read-only

Renders a code graph from an index database using a layered or deterministic force layout, so you can inspect symbols, calls, and references visually. Applies the same spec as the CLI and HTTP render routes.

Instructions

The graph's layout specification: 'layered' (layout spec v1, the default) or 'force' (Fruchterman-Reingold, layout spec v2 - deterministic, fixed parameters recorded in the spec). Above the force ceilings the answer is a stated decline naming the ceiling, not a partial drawing. The same spec objects serve the CLI's render command and the HTTP render route.

Input Schema

NameRequiredDescriptionDefault
layoutNoWhich layout to compute. Default: layered.
db_pathYesPath to the index database.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

B3.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, destructiveHint=false, closed-world), and the description adds real behavioral context beyond them: 'force' is deterministic with fixed parameters recorded in the spec, and exceeding force ceilings yields 'a stated decline naming the ceiling, not a partial drawing' — a valuable disclosure of a failure mode. What is still missing is any statement of what the successful response contains or where the rendering goes.

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

Conciseness3/5

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

The text is compact and front-loads the layout distinction, but it opens with a noun fragment rather than a sentence stating the tool's action, and the CLI/HTTP parity sentence is meta-information of marginal value to an agent. Density is good; framing is not.

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

Completeness2/5

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

With no output schema, the description carries the burden of explaining what a render returns or writes, and it never does — output format, destination, and size/ceiling behavior for the default layered mode are all unstated. For a rendering tool this is a substantive gap in an otherwise informative definition.

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, but the description genuinely enriches the enum: 'layered' is identified as layout spec v1 and the default, while 'force' is tied to Fruchterman-Reingold, layout spec v2, deterministic with fixed recorded parameters. That is meaning an agent cannot get from the bare enum values alone.

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

Purpose3/5

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

The description opens with 'The graph's layout specification' and explains the two layout modes, so an agent can infer this tool renders the code graph using a chosen layout. However, it never states in a verb+resource form what the tool actually produces (an image, SVG, layout coordinates?) or operates on the index database, leaving the core action implied rather than stated.

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

Usage Guidelines2/5

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

There is no guidance on when to choose codetopo_render over siblings such as codetopo_neighborhood, codetopo_snapshot, or codetopo_metrics, and no prerequisites or exclusions. The note that 'the same spec objects serve the CLI's render command and the HTTP render route' is parity information, not usage guidance.

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