Skip to main content
Glama
justguy

ct-mcp

by justguy

detect_concurrency_patterns

Analyze operation steps to detect concurrency hazards such as check-then-act, read-modify-write, and missing idempotency, using optional shared resources and protections.

Instructions

Detect common concurrency hazard patterns in a structured operation description.

REQUIRED INPUT FORMAT — copy this structure exactly: {"steps":["Read current balance","If balance >= cost, approve","Write updated balance"],"shared_resources":["balance"],"protections":[]}

Detects: check-then-act, read-modify-write, missing idempotency, ordering assumptions.

Optional fields:

  • "shared_resources" (string[]) — named shared state

  • "protections" (string[]) — locks, transactions, idempotency keys, etc.

  • "delivery_model" — "at_least_once" | "at_most_once" | "exactly_once"

  • "retry_behavior" — "none" | "automatic" | "manual"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYesOrdered sequence of operation steps
protectionsNoConcurrency protections in place (locks, transactions, idempotency keys)
delivery_modelNoMessage delivery guarantee
retry_behaviorNoRetry behavior on failure
shared_resourcesNoNamed shared state or resources accessed by multiple steps
Behavior3/5

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

No annotations are provided, so the description carries the full transparency burden. It discloses the types of patterns detected and the input structure, but does not mention output format, error behavior, or limitations. This is a moderate disclosure for a pure analysis tool.

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 reasonably structured with a clear lead sentence and a required input format section. The example and bullet list are useful, though slightly long. Every part serves a purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description thoroughly explains the input format and the detection scope, but lacks any description of the return value or output structure. Since no output schema exists, this is a notable gap for a tool whose purpose is to produce analysis results.

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?

The input schema already documents all five parameters (100% coverage), but the description adds a concrete JSON example and clarifies how 'shared_resources', 'protections', 'delivery_model', and 'retry_behavior' fit into the detection context. This goes beyond the schema's simple 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 opens with a specific verb ('Detect'), names the resource ('common concurrency hazard patterns'), and specifies the input ('structured operation description'). It also enumerates specific patterns (check-then-act, read-modify-write, missing idempotency, ordering assumptions), clearly distinguishing it from sibling validation/analysis tools.

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

Usage Guidelines3/5

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

The description provides a required input format and optional fields, but does not explicitly state when to choose this tool over alternatives or when not to use it. Usage is implied by the concurrency focus, but no exclusions or alternative tools are named.

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/justguy/Critical-Thinking-MCP'

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