Skip to main content
Glama

run_snippet

Run a saved snippet inside a specified Detour session to execute commands without typing them again. Provide a snippet name plus session ID or host.

Instructions

Run a saved snippet in a session, like run_command.

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

Input Schema

NameRequiredDescriptionDefault
hostNo
nameYesThe snippet's name.
session_idNoThe session to run it in. Or give `host`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It implies execution and side effects but says nothing about what is returned, whether output is captured, error behavior when the snippet or session is missing, or permission requirements. For an execution tool with zero annotation coverage, this is a substantial gap.

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?

A single front-loaded sentence with no filler, and the sibling analogy is placed where it is immediately useful. It is efficient, though its brevity borders on under-specification for an execution tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations, no output schema, one undocumented parameter, and no disclosure of execution results or failure modes, the definition is not complete enough for a tool that performs an action. An agent would have to guess at return values and host semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is a middling 67%: name and session_id are documented in the schema, but host is type-only and undocumented. The description adds no meaning beyond the schema about name format, host/session_id exclusivity, or default behavior, so it does not compensate for the coverage gap.

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?

"Run a saved snippet in a session" gives a specific verb and resource, and the reference to run_command signals the key distinction: this executes a stored snippet rather than an arbitrary command string. An agent can distinguish it from run_command, add_snippet, and list_snippets 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 Guidelines3/5

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

The "like run_command" comparison implicitly points to the alternative path for ad-hoc execution, which is useful steering. However, there is no explicit statement of when to prefer this over run_command, no prerequisites (e.g., whether the snippet must already exist), and no guidance on the session_id vs. host choice beyond what the schema already says.

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