Skip to main content
Glama

gograph_flow

Read-onlyIdempotent

Trace untrusted HTTP, decoded JSON, or environment data to SQL, process, filesystem, or outbound HTTP sinks in Go code to flag security review targets before changing request parsing or execution.

Instructions

Find potential untrusted-data paths from HTTP request objects, decoded JSON values, or environment variables to SQL query text, process execution arguments, filesystem paths, or outbound HTTP targets. Run gograph build . --precise first for stronger method/interface targets. WHEN TO USE: During a security review or before changing request parsing, command execution, file access, SQL construction, or URL handling. NOT TO USE: As proof of exploitability; the analysis is path-insensitive and call/return context for the 3 most recent call sites by default (context depth up to 16; deeper returns that lose their call site are kept at low confidence), bounded by a size-derived work budget that reports incomplete runs explicitly. RETURNS: Structured findings with source, sink, severity, confidence, parameter_only (constant non-shell program), and path steps; an exhausted budget lists top_functions by work. The policy (.gograph/flow.json or config) adds return-value or argument sanitizers and custom sources and sinks by function.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gograph_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoAbsolute path of your checkout or worktree (alias cwd).
sinkNoOptional sink kind: sql_query, process_execution, filesystem, or outbound_http
termNoOptional substring filter matched against functions, files, endpoints, and path steps
configNoPolicy path inside the graph root (default gograph/flow.json, else .gograph/flow.json, when present)
sourceNoOptional source kind: http_request, decoded_json, or environment
max_workNoOptional propagation work budget; defaults to a value derived from the number of flow facts. An exhausted budget returns completeness.complete=false with partial findings.
no_testsNoExclude functions in *_test.go files
packagesNoLimit analysis to these import paths; prefix/... includes descendants
intentionNoRationale; required with an active session.
session_idNoSession from session_create; omit for none.
context_depthNoOptional call-site frames kept per value (default 3, max 16). Deeper settings are more precise and need more work.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.7.21
    • changedInput schema / properties / config / description
      Previous value: -"Sanitizer policy path inside the graph root (default .gograph/flow.json when present)"New value: +"Policy path inside the graph root (default gograph/flow.json, else .gograph/flow.json, when present)"
    • changedInput schema / properties / intention / description
      Previous value: -"Technical rationale, required for analytical calls selecting an active session."New value: +"Rationale; required with an active session."
    • addedInput schema / properties / packages
      Added value: +{
      +  "description": "Limit analysis to these import paths; prefix/... includes descendants",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / root / description
      Previous value: -"Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean."New value: +"Absolute path of your checkout or worktree (alias cwd)."
    • changedInput schema / properties / session_id / description
      Previous value: -"Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session."New value: +"Session from session_create; omit for none."
  2. Changed5 schema fields changedv1.7.18
    • addedInput schema / properties / context_depth
      Added value: +{
      +  "description": "Optional call-site frames kept per value (default 3, max 16). Deeper settings are more precise and need more work.",
      +  "type": "number"
      +}
    • addedInput schema / properties / intention
      Added value: +{
      +  "description": "Technical rationale, required for analytical calls selecting an active session.",
      +  "type": "string"
      +}
    • addedInput schema / properties / max_work
      Added value: +{
      +  "description": "Optional propagation work budget; defaults to a value derived from the number of flow facts. An exhausted budget returns completeness.complete=false with partial findings.",
      +  "type": "number"
      +}
    • addedInput schema / properties / root
      Added value: +{
      +  "description": "Absolute path of the checkout you are working in (your cwd or git worktree). Must be this server's repository or one of its git worktrees; the answer then comes from that checkout's own graph. A path elsewhere is refused. Alias: cwd. Omit only when the configured checkout is the one you mean.",
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Caller selector returned by session_create. Omission means an independent caller; never inherits server environment or another caller's session.",
      +  "type": "string"
      +}
  3. Addedv1.5.3
  4. Removedv1.5.3
  5. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, and the description still adds substantial behavior beyond them: path-insensitivity, default call/return context of 3 call sites (max 16), low-confidence retention for context-losing returns, a size-derived work budget that reports incomplete runs, and policy-driven sanitizers/sources/sinks. What it omits is any notion of runtime cost or result limits beyond the budget.

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?

Purpose is front-loaded, then organized under WHEN TO USE / NOT TO USE / RETURNS headers, so an agent can scan rather than parse. The middle NOT TO USE sentence is dense and parenthetical-heavy, mixing caveats with tuning facts, which costs some readability.

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?

With 11 optional parameters and no output schema, the description must carry the return shape itself, and it does: findings include source, sink, severity, confidence, parameter_only, and path steps, plus the top_functions behavior on budget exhaustion. Combined with the session_id/intention and config notes, 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 the baseline is 3, but the description earns more by mapping prose source/sink categories (SQL query text, process execution, filesystem, outbound HTTP; http_request, decoded_json, environment) onto the sink/source parameters, which the schema lists as free-form strings with no formal enums. It also states the prerequisite 'gograph build . --precise' that conditions result quality.

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

Purpose4/5

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

The description opens with a specific verb and resource: 'Find potential untrusted-data paths' from named source kinds (HTTP requests, decoded JSON, env vars) to named sink kinds (SQL text, exec args, filesystem paths, outbound HTTP). That is far more precise than the tool name alone, but it never names a sibling tool (e.g. gograph_errorflow) to distinguish itself within the catalog, so it falls short of a 5.

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?

Explicit WHEN TO USE triggers (security review, before changing request parsing/command execution/file access/SQL construction/URL handling) and an explicit NOT TO USE clause warning that results are not proof of exploitability. The only gap is that no alternative tool is named when this one is the wrong choice, so an agent must infer the substitute.

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