Skip to main content
Glama

set_frame_filter

Idempotent

Restricts this CAN session's receive filter to an inclusive arbitration-ID range, replacing any previous filter so receive, monitor, and scenario waits see only matching IDs.

Instructions

Replace this session's RX filter with one inclusive arbitration-ID range.

    Requires an open session. Replaces the previous filter; it does not add a
    second range and does not transmit. To receive every ID again, call
    accept_all_frames. receive_frame, monitor, and scenario waits then see only
    IDs from start_id through end_id. Success data is
    {start_id, end_id, is_extended, mode: "mask"}. A bus without set_filters
    returns CAPABILITY_UNSUPPORTED.
    

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>",
      "start_id": "<start_id>",
      "end_id": "<end_id>"
    },
    "name": "set_frame_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceYesDevice alias from config / list_devices
end_idYesInclusive end of accepted arbitration ID range
start_idYesInclusive start of accepted arbitration ID range
is_extendedNoMatch extended (29-bit) IDs when true; default false

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.4
    • addedInput schema / properties / device / description
      Added value: +"Device alias from config / list_devices"
    • addedInput schema / properties / end_id / description
      Added value: +"Inclusive end of accepted arbitration ID range"
    • addedInput schema / properties / is_extended / description
      Added value: +"Match extended (29-bit) IDs when true; default false"
    • addedInput schema / properties / start_id / description
      Added value: +"Inclusive start of accepted arbitration ID range"
  2. First observedv0.1.3

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=true), the description discloses that no traffic is transmitted, that the previous filter is destroyed rather than extended, and that downstream calls (receive_frame, monitor, scenario waits) are scoped to the new range. It also names the failure mode CAPABILITY_UNSUPPORTED, which is behavior an agent cannot get from the annotations.

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 definition is front-loaded with the core action and constraint, and each sentence adds either a side effect, an alternative, or an error condition. The success-payload sentence ('{start_id, end_id, is_extended, mode: "mask"}') is somewhat redundant given a dedicated output schema exists, which keeps it from a 5.

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-scoped state mutation with four parameters, the description covers prerequisites, replacement semantics, non-transmission, affected consumers, and the capability error. Nothing an agent needs in order to invoke it correctly is missing, and the duplicated return-shape line is harmless rather than a gap.

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 description coverage is 100%, so the schema already documents device, start_id, end_id, and is_extended. The description only reinforces the inclusivity and range semantics ('start_id through end_id'), which matches the schema wording rather than adding new meaning; is_extended is not discussed at all. Baseline 3 is appropriate when the schema carries the parameter burden.

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 and resource: 'Replace this session's RX filter with one inclusive arbitration-ID range.' It also distinguishes the behavior from accept_all_frames by naming that sibling and its additive-vs-replacement relationship, so an agent can select it without inspecting 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 the prerequisite ('Requires an open session'), the key non-obvious exclusion ('Replaces the previous filter; it does not add a second range'), and names the alternative path ('To receive every ID again, call accept_all_frames'). The when-to-use and when-to-use-something-else conditions are both explicit.

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