Skip to main content
Glama
crosspad-mcp-server

crosspad-mcp-server

Official
by CrossPad

crosspad_bench_claim

Destructive

Claim the shared CrossPad bench before any hardware call to get a lease or queue position, preventing concurrent sessions from disrupting active tests.

Instructions

[ESP HW | STM HW] Claim the shared CrossPad bench before any hardware call; the reply says whether the lease is granted or your place in the queue. Several sessions use one board; opening its CDC port or flashing it breaks whoever is mid-test, so the board is leased: one holder, a queue behind it, expiry after the ttl without renewal. granted=true: you hold it; this server then sends your holder name with every hardware call and each call renews the lease. granted=false: another session holds it (message names it and its ETA, position is your place in the queue); hardware tools answer BENCH_BUSY until you hold it, so claim again later. A place not refreshed for an hour lapses; when the holder releases, the head of the queue has 10 minutes to claim. Calling it while you hold the board renews the lease. When done, call crosspad_bench_release.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "holder": "<holder>",
      "purpose": "<purpose>"
    },
    "name": "crosspad_bench_claim"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoTake the board from its current holder. Only for a holder that is gone (no answer, long past its ETA); it is logged in the board's history.
deviceNoDevice id (dev_xxxx) or one of its port paths; omit when one CrossPad is connected. An id works even while the board is unplugged or in DFU.
holderYesYour session's name, e.g. 'platform-idf-cf' or 'crosspad-web-twin'. Use the same name every time: it is how the lease knows you.
purposeYesWhat you are about to do and which firmware you will flash, e.g. 'firmware_app test on pidf eac76e8, ~40 min'. Other sessions see it.
ttl_minNoMinutes before the lease expires unless renewed (default 30). Every hardware call you make renews it, and a running scenario or OTA keeps it alive.

Output Schema

NameRequiredDescriptionDefault
tsNo
nowNo
docsNo
hintNo
nextNo
pathNo
errorNo
leaseNo
queueNo
deviceNo
holderNo
noticeNo
now_atNo
detailsNo
devicesNo
grantedNo
historyNo
messageNo
successYes
firmwareNo
positionNo
releasedNo
left_queueNo
reserved_forNo
session_holderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv11.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only flag destructive/not-readOnly/non-idempotent; the description supplies the real mechanics: one holder plus a FIFO queue, TTL expiry without renewal, every hardware call auto-renewing and carrying the holder name, queue lapse after an hour, and a 10-minute window at the head. The force parameter's destructive consequence (taking the board from a live holder) is called out and tied to being logged in history, consistent with destructiveHint=true.

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?

Front-loaded with the imperative and the constraint, then the two outcome branches in a readable granted=true / granted=false split. Dense but nearly every clause carries operational information; the lease-expiry and queue-lapse details are the only parts that push toward length.

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?

For a contended-resource lock with 5 parameters, an output schema, and destructive annotations, the description covers the whole lifecycle: claim, contention, renewal, expiry, queue advancement, force override, and release. An agent has everything needed to call it correctly and interpret either outcome.

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 baseline is 3; the description still adds meaning by delivering the semantics of ttl ("expiry after the ttl without renewal," each call renews) and of holder as the lease identity, plus the granted=false payload fields message/position. It stops short of explaining device/port behavior in prose, leaving that to the 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: "Claim the shared CrossPad bench before any hardware call," and immediately scopes it to the ESP HW / STM HW bench. The granted/queue framing makes it unmistakable versus crosspad_bench_status (inspect) and crosspad_bench_release (give up).

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?

Explicitly says when to call (before any hardware call), what happens if you skip it (hardware tools answer BENCH_BUSY), what to do on failure (claim again later, or force only for a dead holder), and names the follow-up sibling: "When done, call crosspad_bench_release." Re-claiming while holding is also documented as a renewal path.

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