Skip to main content
Glama

open_device

Idempotent

Opens a CAN session for a device alias and keeps the bus active for send, receive, monitor, filter, and periodic frame operations; reuses an existing session instead of reopening.

Instructions

Open a CAN session for one alias and keep the bus in this process.

    Required before send_frame, receive_frame, monitor, filters, and periodic_*.
    If the session is already open, returns data.reused=true and does not reopen.
    If state is error, returns DEVICE_NOT_OPEN; close_device and retry. Success
    data is {state: "open", reused: bool}. Real adapters need a host SDK; a
    virtual config opens without USB. Does not send or receive frames.
    

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": "open_device"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceYesDevice alias from config / list_devices

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • addedInput schema / properties / device / description
      Added value: +"Device alias from config / list_devices"
  2. First observedv0.1.3

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations it discloses the idempotent mechanism ("returns data.reused=true and does not reopen"), the specific error code DEVICE_NOT_OPEN, the success payload shape, and the environment constraint that real adapters need a host SDK while a virtual config opens without USB. It also explicitly bounds behavior with "Does not send or receive frames", which is meaningful given openWorldHint=true.

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?

The purpose is front-loaded in the first sentence, followed by prerequisites, idempotency, error handling, and constraints in a tight sequence. Every sentence carries distinct operational information with no filler.

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 session-opening tool with one parameter, the description covers prerequisites, reuse semantics, failure recovery, environment requirements, and explicit non-behavior. Even though an output schema exists, it briefly names the success shape, leaving nothing an agent needs in order to call it correctly.

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?

Schema coverage is 100% and the single parameter already documents "Device alias from config / list_devices". The description adds only the notion of one session per alias, which is marginal beyond the schema, so the baseline of 3 applies.

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 opening sentence gives a specific verb and resource ("Open a CAN session") plus scope ("for one alias and keep the bus in this process"), which distinguishes it from close_device and the frame tools. An agent can identify the tool's job without opening the schema.

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?

It states an explicit prerequisite chain ("Required before send_frame, receive_frame, monitor, filters, and periodic_*") and gives recovery guidance for the failure path ("If state is error, returns DEVICE_NOT_OPEN; close_device and retry"). Both when-to-use and what-to-do-on-failure are spelled out, with the relevant sibling named.

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