Skip to main content
Glama

Code to flowchart with dry run

code_to_flowchart

Turn source code (C, C++, Java, Python or JavaScript, up to 80 lines) into a lab-record style flowchart where every box is linked to its code lines, plus a step-by-step dry run for a sample input (current line, box and variables at each step). Returns a link that opens it ready to play (▶ Explain), the program output and Mermaid code. Uses 1 AI credit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe program or function, as source code.
languageNoOptional; detected if left out.
sample_inputNoOptional input for the dry run, e.g. "n = 5". Picked automatically if left out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnly=false, openWorld=true, idempotent=false, destructive=false. The description goes further, disclosing the returned artifacts (a ready-to-play link, the program output, Mermaid code) and the 1-credit cost. It stops short of saying whether the generated link is public or persists, which for an openWorldHint=true tool would be worth stating.

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

Conciseness4/5

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

Two sentences, front-loaded with the core transformation and then the output artifacts and cost. Dense but each clause carries information (languages, line cap, deliverables, credit cost) with no filler.

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?

There is no output schema, and the description compensates by enumerating the return payload (link, output, Mermaid code). Combined with the language list, size cap, optional-param auto-detection and credit cost, an agent has everything needed to call it correctly.

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 baseline is 3; the description adds the 80-line limit on `code` and frames `sample_input` as feeding the dry run ('current line, box and variables at each step'), which sharpens what that optional param actually controls beyond the schema's terse 'Input for the dry run.'

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?

Specific verb+resource with scope: 'Turn source code ... into a lab-record style flowchart' with every box linked to its code lines, plus a dry run. It names the supported languages and the 80-line cap, so an agent can immediately tell this apart from the generic sibling create_diagram.

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

Usage Guidelines4/5

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

The input type (source code) makes the trigger condition clear, and the 'Uses 1 AI credit' note is a useful cost signal for deciding when to spend it. However, it never explicitly contrasts itself with create_diagram or the template tools, so routing between siblings is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources