Skip to main content
Glama

test_concurrency_safety

Simulates concurrent write or edit operations on one temporary file to verify that file locking prevents data corruption and reports whether concurrency safety holds.

Instructions

Test that file_ops write/edit locking prevents data corruption under concurrent load.

Simulates num_clients simultaneously writing or editing the same temp file. All should succeed without data corruption if locking is working correctly.

Return Format

{"test_operation": str, "num_clients": int, "successful": int, "errors": [str], "concurrency_safe": bool}

Examples

test_concurrency_safety(operation="write", num_clients=5) test_concurrency_safety(operation="edit", num_clients=10)

Input Schema

NameRequiredDescriptionDefault
operationNowrite
num_clientsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false; the description adds meaningful context by clarifying the writes target a temp file and that corruption is the observable signal, so an agent understands the blast radius. It does not mention runtime cost or that the result may be nondeterministic, so it falls short of full disclosure.

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 in the first sentence, with the semantics of the simulated load right after. The return format block duplicates the existing output schema, which is slightly wasted space, but the examples justify themselves.

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

Completeness4/5

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

An output schema exists, so the return-format section is redundant rather than necessary; the absence of any contention/timeout expectations or guidance on interpreting concurrency_safe=false is the main remaining gap. For a two-parameter diagnostic tool, this is largely complete.

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 0%, so the description carries the burden—and it does partially by revealing the operation values 'write' and 'edit' via examples and showing plausible num_clients values. It still never documents the default values (write, 5) or bounds on num_clients, but it adds real meaning beyond the bare schema.

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?

States a specific verb and resource: tests that file_ops write/edit locking prevents corruption under concurrent load. This clearly distinguishes it from get_lock_status (which reports status) and file_ops (which performs the operations).

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?

Explains what the test simulates but never states when an agent should run this test versus checking get_lock_status or invoking file_ops directly. Usage is implied by the 'test' framing rather than stated, and no alternatives are named.

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