Skip to main content
Glama

trace_dataflow

Trace data flow paths from or to a variable to analyze data lineage, identify tainted data sources, or assess impact of changes.

Instructions

Trace data flow paths from or to a variable/expression.

Use this when you need to:

  • Forward trace: "Where does this value flow to?" (assignments, function calls, returns)

  • Backward trace: "Where does this value come from?" (sources, assignments)

  • Both: Full data lineage from sources to sinks

Direction options:

  • forward: Follow ASSIGNED_FROM, PASSES_ARGUMENT, FLOWS_INTO edges downstream

  • backward: Follow edges upstream to find data sources

  • both: Trace in both directions for complete context

Use cases:

  • Track tainted data: "Does user input reach database query?" (forward from input)

  • Find data sources: "What feeds this API response?" (backward from response)

  • Impact analysis: "If I change this variable, what breaks?" (forward trace)

Returns: List of nodes in the data flow chain with edge types and depth. Tip: Start with max_depth=5, increase if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesVariable or node ID to trace from
fileNoFile path
directionNoforward, backward, or both (default: forward)
max_depthNoMaximum trace depth (default: 10)
limitNoMax results (default: 10)
detailNoLevel of detail: summary (counts only), normal (auto-compressed, default), full (every node)
Behavior4/5

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

No annotations are provided, so the description fully bears the burden. It explains how edges are followed (ASSIGNED_FROM, PASSES_ARGUMENT, FLOWS_INTO) and what directions do. It does not mention side effects or state modifications, but as a trace tool it is inherently read-only. This is adequate disclosure.

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?

The description is well-structured with bullet points and sections, no redundancy. It is front-loaded with the core purpose, and every sentence adds meaningful information. The tip at the end is concise and helpful.

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?

Given the complexity (6 params, no output schema), the description explains the return value ('List of nodes in the data flow chain with edge types and depth'). It covers direction options, use cases, and a practical tip, making the tool fully understandable for an AI agent.

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?

With 100% schema description coverage, baseline is 3. The description adds value by elaborating on direction options (forward, backward, both) and advising to start with max_depth=5. It also briefly explains detail levels, going beyond the schema's bare descriptions.

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 clearly states 'Trace data flow paths from or to a variable/expression.' It specifies the verb 'trace' and resource 'data flow paths', and distinguishes itself from sibling tools like trace_calls and trace_effects by focusing on data flow with forward, backward, and both directions.

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 description explicitly provides when to use forward/backward/both tracing and gives concrete use cases (e.g., tainted data, impact analysis). It also recommends starting max_depth at 5. However, it does not explicitly mention when not to use this tool or suggest alternatives, which would earn a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Disentinel/grafema'

If you have feedback or need assistance with the MCP directory API, please join our Discord server