Skip to main content
Glama

attach_stim_backend

Bind a stimulation backend to a session and open its transport. Rehearse protocols with the log backend before switching to a real device.

Instructions

Bind a stimulation target to a session and open its transport.

Start with backend='log' to rehearse a protocol with no output at all, then switch once the timing looks right.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
backendNoOne of the names from list_stim_backends.log
optionsNoBackend-specific settings. For serial backends: {"port": "COM3"}. For templated devices (tms, tes, template_serial), the commands from your device manual, e.g. {"port": "COM3", "templates": {"fire": "TRIG\r\n", "set_intensity": "AMP {intensity:.0f}\r\n"}}.
session_idYesThe session to attach to.
make_defaultNoUse this backend when send_stim_event omits one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

There are no annotations provided, so the description carries the full burden. It does disclose that this opens a transport and can be used for rehearsal, but it doesn't detail potential side effects (disarming existing stim, device connection requirements, whether the transport consumes hardware resources that need explicit teardown). The 'open its transport' phrasing hints at resource acquisition but doesn't explain cleanup requirements.

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 description is compact—two sentences that earn their place. The first states the purpose, and the second gives actionable advice. It's slightly front-loaded and could arguably add a bit more operational detail, but it's efficiently written with no filler.

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?

Given the tool has moderate complexity, 100% schema coverage, and an output schema, the description covers the core scenario (backend selection, rehearsal to production flow). It could mention what the output/return contains or what 'transport' implies operationally, but with a rich schema and output schema present, the description is reasonably complete for selecting and invoking the 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 the baseline is 3. The description adds value by explaining the 'log' backend default for rehearsal and ties the 'switch once the timing looks right' advice to the backend parameter. The schema already documents backend and options well with examples, and the description reinforces the practical distinction between backends.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'binds a stimulation target to a session and opens its transport', which is a specific verb+resource pair. It distinguishes from siblings like detach_stim_backend and list_stim_backends through the word 'open its transport' and the attached context, though it doesn't explicitly name the alternative/sibling options.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear practical guidance: start with backend='log' to rehearse a protocol with no output, then switch once timing looks right. This provides concrete usage context, though it doesn't explicitly state when NOT to use this tool or name alternative tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AImplifier/eeg-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server