Skip to main content
Glama

add_snippet

Store a named command as a reusable snippet in the Detour vault, requiring vault edit permission.

Instructions

Save a snippet: a named command (needs vault:edit).

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>",
      "command": "<command>"
    },
    "name": "add_snippet"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
commandYesThe command it runs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden; it does deliver the key auth requirement (vault:edit), which an agent needs before invoking. However, it omits whether saving an existing name overwrites or errors, whether changes are persistent, and what the tool returns, leaving real gaps for a write operation.

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 wasted words, and the authorization requirement is appended efficiently. It is perhaps over-terse for a state-mutating tool, but nothing is redundant.

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

Completeness3/5

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

For a simple two-parameter create tool with no output schema and no annotations, the definition covers purpose and permissions. It still leaves an agent unsure about duplicate-name behavior and return value, which matter for a save operation, so it is adequate rather than complete.

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 only 50%: only `command` has a schema description, while `name` is undocumented in the schema. The phrase "a named command" implies `name` is a label for the command and that both are required, adding modest meaning beyond the schema, but it gives no format, uniqueness, or length constraints.

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?

"Save a snippet: a named command" gives a specific verb (save/create) plus a resource and even defines what a snippet is, which is stronger than a bare tautology. It does not explicitly contrast with add_host, run_snippet, or remove_snippet, but the verb makes the create-vs-run-vs-remove distinction inferable.

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 parenthetical "needs vault:edit" is a useful precondition for calling the tool, so usage context is partially provided. There is no explicit statement of when to choose this over run_snippet or list_snippets, or what to do if the snippet already exists, so guidance remains implied.

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