Skip to main content
Glama

receive_frame

Reads the next CAN frame from an open device session, waiting up to a timeout and returning null when no frame arrives.

Instructions

Receive the next CAN frame from an open session (consumes one frame).

    Requires open_device. Waits up to timeout seconds; on timeout returns
    status=ok with frame=null (not an error). Prefer monitor to capture many
    frames over a wall-clock window; prefer wait_id inside run_scenario when
    matching a specific ID. Returns JSON Result.
    

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": {
      "device": "<device>"
    },
    "name": "receive_frame"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceYesDevice alias from config / list_devices
timeoutNoSeconds to wait for one frame; default 1.0

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.4
    • addedInput schema / properties / device / description
      Added value: +"Device alias from config / list_devices"
    • addedInput schema / properties / timeout / description
      Added value: +"Seconds to wait for one frame; default 1.0"
  2. First observedv0.1.3

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, idempotent=false, destructive=false; the description goes further by disclosing the state-mutating consumption of one frame, the open-session prerequisite, and the non-obvious timeout contract (status=ok with frame=null rather than an error). That timeout detail is exactly the kind of behavior an agent cannot infer from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action in the first sentence, then prerequisites, then alternative routing, then return type. Four short sentences, none repeating the schema or annotations.

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 an output schema present, return values need not be detailed, and the description still signals "Returns JSON Result." Prerequisite, blocking behavior, timeout semantics, and alternative tools are all covered for a two-parameter tool.

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, but the description adds real meaning about the effect of `timeout` — it bounds the wait and its expiry yields a successful null frame, not a failure. It adds nothing extra for `device` beyond the schema's alias note.

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+resource ("Receive the next CAN frame") and adds the crucial qualifier "from an open session (consumes one frame)," which makes the read-and-consume nature unambiguous against siblings like monitor or send_frame.

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?

Gives an explicit prerequisite ("Requires open_device") and names two concrete alternatives with the conditions that select them: monitor for many frames over a wall-clock window, wait_id inside run_scenario for a specific ID.

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