Skip to main content
Glama
smurfy92

openclaw-control-mcp

by smurfy92

openclaw_sessions_tail

Monitor a session by polling for new messages, returning only those that appear during the tail window until the session ends or a message limit is reached.

Instructions

Watch a session by polling sessions.preview and return only the NEW messages that appeared during the tail window. Workaround for the stdio MCP not being able to stream sessions.subscribe / session.message events to Claude Code. Polls every intervalMs (default 2000ms) for up to durationMs (default 30000ms, max 300000ms), or until maxMessages new messages are collected, or until the session reaches a terminal status ('done', 'error', 'aborted', 'timeout', 'completed'). The first poll seeds the 'already-seen' set so existing messages are NOT returned — only what arrives after the tool was called.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesFull session key (composite, e.g. 'agent:main:cron:<id>') from openclaw_sessions_list.
instanceNoOptional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list.
durationMsNoTotal tail duration in ms. Default 30000 (30s). Max 300000 (5min).
intervalMsNoPolling interval in ms. Default 2000 (2s). Min 500 to avoid hammering the gateway. Max 10000.
maxMessagesNoStop early once this many new messages have arrived — useful to bail out on the first agent reply.
Behavior5/5

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

With no annotations, the description fully carries the burden. It explains polling mechanics, the first-poll seed set that excludes existing messages, termination criteria (duration, maxMessages, terminal status), and a rate-limit warning (min interval 500ms). All behavioral traits are disclosed.

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 description is concise and well-structured: first sentence states purpose, then provides context/workaround, and finally details behavior. Every sentence adds value with minimal redundancy.

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?

The description covers purpose, behavior, termination conditions, and references sibling tools. It lacks explicit return format details, but given the tool's simple purpose (return new messages), this is acceptable. Output schema is absent, but the description sufficiently implies the return type.

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 the baseline is 3. The tool description does not add significant meaning beyond the already-detailed schema parameter descriptions; it focuses on overall behavior rather than parameter specifics.

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?

The description states a specific verb and resource: 'Watch a session by polling sessions.preview and return only the NEW messages.' It clearly distinguishes from siblings like openclaw_sessions_preview (snapshot) and openclaw_sessions_subscribe (streaming), which are mentioned in the workaround context.

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?

The description explains when to use this tool: as a workaround for the inability to stream events via stdio MCP. It details polling behavior, termination conditions, and default/max values. It does not explicitly state when NOT to use it or name alternatives beyond implicit reference to subscribe endpoints, but the usage context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/smurfy92/openclaw-control-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server