Skip to main content
Glama

cfg

Read-only

Draw a function's control-flow graph as Mermaid, showing blocks and successor edges paginated at 300 blocks. Use for visualizing control flow, not for reading logic or block tables.

Instructions

Draw a function's control-flow graph as mermaid: blocks and successor edges, 300 blocks a page, a %% line when cut. Not for reading logic (use decompile) or a block table (use function).

Input Schema

NameRequiredDescriptionDefault
offsetNoBlocks to skip, 300 a page.
addressYesFunction entry or any address inside it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds meaningful output behavior beyond annotations: mermaid text with blocks and successor edges, pagination at 300 blocks per page, and a '%% line when cut' truncation marker. It does not describe every edge case, but it substantially enriches the behavioral picture.

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?

Two tightly packed sentences with zero waste. The core action and output format are front-loaded, followed by pagination/truncation details and then explicit tool alternatives. Every sentence earns its place.

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 read-only CFG visualization tool, the description covers purpose, output format, pagination behavior, truncation signaling, and when to use alternatives. Although there is no output schema, the mermaid return format is described sufficiently for correct invocation. Nothing critical is missing.

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 both parameters are already documented: 'offset' is blocks to skip at 300 per page, and 'address' is a function entry or any address inside it. The description repeats the '300 blocks a page' pagination but adds no new parameter semantics beyond the schema. Baseline 3 is appropriate.

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 resource: 'Draw a function's control-flow graph as mermaid'. It also explicitly distinguishes itself from two sibling tools by naming what it is not for and pointing to 'decompile' and 'function'. An agent can identify the right tool without opening schemas.

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?

Provides explicit exclusions and alternatives: 'Not for reading logic (use decompile) or a block table (use function).' This directly says when to use this tool versus others, leaving little inference.

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