Skip to main content
Glama

tunnel_read

Destructive

Fetches the value stored by a previous tunnel_create call using its ID. Consume once; the value is destroyed after reading and may expire if maxReads is set.

Instructions

[tunnel] Fetch the value stashed by a prior tunnel_create call by its ID. Use exactly once per intended consumer; the value is destructive-by-design and may self-delete after this call. Increments the read counter and may auto-destroy the tunnel if maxReads was set. Returns JSON { ok, data: { id, value } } on success, or an error 'Tunnel "..." not found or expired' if the tunnel has been destroyed, hit its TTL, or never existed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe opaque tunnel ID returned by `tunnel_create`. Case-sensitive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.7
    • changedInput schema / properties / id / description
      Previous value: -"Tunnel ID"New value: +"The opaque tunnel ID returned by `tunnel_create`. Case-sensitive."
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses self-deletion-by-design, read-counter increment, auto-destroy when maxReads is set, and the exact error string on failure. Annotations already flag destructive/non-idempotent, and the description enriches that with the concrete destruction mechanism.

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?

Three dense sentences with no filler; the destructive-consumption warning is front-loaded right after the purpose. Slightly redundant in restating the ID provenance and the return shape together, keeping it just under 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?

With no output schema, the description supplies the success shape ({ ok, data: { id, value } }) and the failure shape, plus the destruction semantics an agent needs before calling a one-shot destructive read. Nothing material is missing.

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 the single `id` parameter is already documented there as the opaque, case-sensitive ID from tunnel_create. The description echoes this without adding format or validation detail, so the baseline of 3 applies.

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 ('Fetch the value stashed by a prior tunnel_create call by its ID') and ties itself to the sibling that produces the input, so it is clearly distinguishable from tunnel_create/tunnel_list/tunnel_destroy.

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?

Gives explicit consumption guidance ('Use exactly once per intended consumer') and explains the failure condition (destroyed, TTL expired, never existed). It stops short of naming alternative tools or the alternative action when a tunnel is gone, so it is clear context without full routing.

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