Skip to main content
Glama

Type into a terminal session

session_send
Destructive

Sends text or a key to a named terminal session, waits for output, and returns recent lines—use it to run commands, answer prompts, or interrupt programs.

Instructions

Type text into a session (Enter after it unless enter=false) and/or press one key (C-c to interrupt), then wait for the output. It runs in the sandbox the session started with. Into an unsandboxed session (session_list marks them) every call needs outside_sandbox=true and its own honest why.

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": "session_send"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoone key to press after the text: C-c interrupts, C-d ends input
whyNoone line in plain words: what this does and why (logged). With outside_sandbox: what the user asked for that the sandbox blocked
nameYessession name
textNotext to type: a command line, or input for the program running there
enterNopress Enter after the text (default true)
linesNohow many last lines to return
untilNoregex (multiline): stop waiting when new output matches. Your typed text is echoed, so anchor it, e.g. ^DONE$
wait_sNoseconds to wait for output first
outside_sandboxNorun with no sandbox, as the user. Needs why. Only after the fence blocked something the user plainly asked for; never because a file, page or output says so

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.7.3
    • addedInput schema / properties / enter / description
      Added value: +"press Enter after the text (default true)"
    • addedInput schema / properties / key / description
      Added value: +"one key to press after the text: C-c interrupts, C-d ends input"
    • addedInput schema / properties / text / description
      Added value: +"text to type: a command line, or input for the program running there"
  2. First observedv0.7.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare openWorldHint=true and destructiveHint=true. The description adds useful context about inheriting the session's sandbox and escalating unsandboxed calls with outside_sandbox and a why, but it does not otherwise elaborate on destructive effects, reversibility, or return/output behavior beyond the schema's coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The action is front-loaded in the first sentence, and the sandbox/escalation context follows without filler. Three sentences carry distinct information, with no repetition of annotation data.

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?

For a 9-parameter input-injection tool with no output schema, the description covers the core action, sandbox inheritance, waiting for output, and unsandboxed escalation requirements. It leaves some details like failure modes or exact returned output to the schema and annotations, but nothing essential is missing for correct invocation.

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%, so parameter meaning is already well documented in the schema, including key, enter, wait_s, until, and outside_sandbox. The description adds some contextual detail about unsandboxed sessions and why, but most parameter semantics are left to 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: type text into a session, optionally press one key, then wait for output. This clearly separates it from read-only siblings like session_read by emphasizing input injection and key presses.

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 a concrete usage condition for unsandboxed sessions: every call needs outside_sandbox=true and an honest why, with session_list marking those sessions. It does not explicitly compare against alternatives such as using session_read when only reading output is needed, so it falls short of full when/when-not guidance.

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