Skip to main content
Glama

Get Connection Decision

terminal_get_connection_decision
Read-only

Evaluates the configured policy for a discovered endpoint before opening a serial session, returning ask, connect, deny, or none so clients know whether user approval or no action is required.

Instructions

Evaluate the configured response to a discovered endpoint. After an appeared device event, call this before terminal_open_serial: action ask requires user approval, connect permits client-controlled opening, deny requires no action, and none requires no action. This tool never opens a session.

Input Schema

NameRequiredDescriptionDefault
endpointYesRuntime endpoint reported by device discovery, for example COM6.
transportYesTransport family reported by device discovery, for example serial.

Output Schema

NameRequiredDescriptionDefault
actionYes
policyYes
reasonNo
presentYes
endpointYes
connectedYes
transportYes
session_idNo
session_refNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds the key non-obvious guarantee that 'this tool never opens a session' despite its connection-oriented name. It also discloses the decision vocabulary (ask/connect/deny/none), which the agent cannot infer from the name alone. It does not mention caching or whether repeated calls are stable, a minor gap against idempotentHint=false.

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 purpose, then the sequencing rule, then the outcome glossary, then the safety guarantee. Three sentences, no filler; only 'deny requires no action, and none requires no action' is slightly redundant phrasing that still signals a real distinction between the two outcomes.

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?

An output schema exists, so return structure needn't be explained, yet the description still glosses the decision values, which is the right thing to include. An agent knows when to call it, what it produces, and that it has no side effect; only error behavior for unknown endpoints is unaddressed.

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% and both parameters (endpoint, transport) are documented with examples, so the baseline is 3. The description adds nothing about format, matching rules, or how transport affects the decision, so it does not exceed 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 ('Evaluate the configured response to a discovered endpoint') and positions itself precisely against the sibling it feeds into (terminal_open_serial). An agent can distinguish it from connection/opening tools without opening either 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?

Gives an explicit trigger ('After an appeared device event') and an explicit ordering ('call this before terminal_open_serial'), plus the downstream meaning of each outcome. This is a when-to-use plus what-to-do-next instruction, not just context.

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