Skip to main content
Glama

session_prompt

Sends prompt text to a specified OpenCode peer session and optionally waits for the remote response; use the server argument only when multiple servers are available.

Instructions

Prompt a session on one server. Omit the server argument when exactly one server is available.

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": {
      "session_id": "<session_id>",
      "prompt": "<prompt>"
    },
    "name": "session_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptYesPrompt text to send.
serverNoServer id. Omit when exactly one server is available.
allowedNoAllow write operations (gated).
wait_forNoWait up to this many milliseconds for the remote session to complete, then return its response. Null/omitted returns immediately.
session_idYesSession id on that server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, openWorldHint=false, and idempotentHint=false, so the safety profile is covered without description help. The description adds the single-server omission rule but says nothing about the write-gating via 'allowed', what happens on repeated prompts given non-idempotency, or the blocking semantics of the call. Nothing contradicts the annotations.

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?

Two short sentences with the core action front-loaded and no filler. The second sentence largely duplicates the server parameter's schema description, so it does not fully earn its place in the description body.

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?

This is a non-idempotent, non-readonly operation with a 5-parameter schema and no output schema, so an agent needs to understand blocking behavior and write gating. The rich schema descriptions compensate for most of that, but the description itself leaves the returned-response semantics and failure modes 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%, so all five parameters (prompt, server, allowed, wait_for, session_id) are already documented in the schema. The description only restates the server-omission rule that the schema already gives, adding no new meaning to wait_for, allowed, or session_id; the baseline 3 applies.

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?

The description gives a specific verb (prompt) and resource (a session on one server), which distinguishes it from read/control siblings like session_messages, session_get, and session_interrupt. It stops short of saying what 'prompting' entails (sending text and awaiting a reply), so it is clear but not fully differentiating.

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?

There is one concrete routing rule: omit the server argument when exactly one server is available. There is no guidance on when to use this versus session_interrupt or session_messages, no note about needing an existing session_id, and nothing about when to set wait_for or allowed, so usage is only partially implied.

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