Skip to main content
Glama

gograph_concurrency

Read-onlyIdempotent

Find all concurrency primitives in Go code: goroutines, channels, mutexes, WaitGroups, Once, and select statements. Filter by term like 'mutex' or 'channel'. Essential for race safety audits and async flow analysis.

Instructions

Find all concurrency primitives in the codebase: goroutine spawns (go statements), channel operations, sync.Mutex/RWMutex, sync.WaitGroup, sync.Once, and select statements. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Optional term filter (e.g., "mutex", "goroutine", "channel"). WHEN TO USE: When auditing race safety, understanding async flow, or locating all synchronization points before a concurrency refactor. NOT TO USE: For standard sequential call flow analysis (use gograph_callers/gograph_callees). RETURNS: File locations, line numbers, and primitive kind for each concurrency site; empty when no concurrency primitives are found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoOptional filter term (e.g., 'goroutine', 'mutex', 'channel')
Behavior5/5

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

The description confirms the read-only, no-side-effects nature (supported by annotations) and adds context about requiring a pre-built graph file. It describes the return format (file locations, line numbers, primitive kind) and the empty result case, going beyond what annotations provide.

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?

The description is front-loaded with the core purpose and provides additional context in subsequent sentences. It is slightly lengthy but each sentence adds value; could be tightened but is still efficient.

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 tool's focus on concurrency primitives, the description covers what it finds, prerequisites, usage context, return information, and a filter option. With annotations covering safety, the description is fully adequate without needing an output schema.

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?

The schema already describes the optional term parameter with examples. The description repeats the same examples, adding no new semantic information beyond the schema. Given 100% schema coverage, the baseline is 3.

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?

Description clearly states the tool finds all concurrency primitives in the codebase, listing specific constructs like goroutine spawns, channel operations, and sync primitives. It distinguishes from siblings by noting that for sequential call flow analysis, one should use gograph_callers/gograph_callees instead.

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?

The description explicitly states when to use this tool (auditing race safety, understanding async flow, locating synchronization points) and when not to use it (for standard sequential call flow analysis, with sibling alternatives provided). It also mentions the prerequisite of running 'gograph build .' first.

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/ozgurcd/gograph'

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