Skip to main content
Glama

rex_block_close

Closes a selected Rex block, ends its program, and closes the window if it was the last block; never closes idle blocks or other blocks.

Instructions

Close a block and end its program (rex block close). Rex closes the window too when that was its last block. Never closes a block for being idle, and never closes any other block.

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": {
      "block": "<block>"
    },
    "name": "rex_block_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
blockYesBlock label, ID, or ID suffix
sessionNoSession label or ID

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?

With no annotations, the description must carry the behavioral burden. It usefully discloses key side effects: closing the block, ending its program, and closing the window when it is the last block. It does not cover permissions, reversibility, error behavior, or what happens to session state, which are meaningful gaps for a mutation 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?

The description is short and front-loads the primary action. The sentence about never closing idle or other blocks adds useful scope. The parenthetical '(rex block close)' is slightly redundant with the tool name but does not materially hurt readability.

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 close operation with full schema coverage, the description covers the main action and important side effects. It lacks details on return behavior, failure cases, and session effects. No output schema exists, so the description could do more to explain outcomes, but it remains adequate for basic 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 the input schema already documents both the block and session parameters. The description does not add any further meaning about parameter formats, expected values, or behavior of the session parameter. Baseline 3 is appropriate when the schema already does this work.

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 states a specific verb and resource: close a block and end its program. It also clarifies window behavior when closing the last block, making the core action clear. It does not explicitly distinguish this from named sibling tools such as rex_session_kill, so it falls short of full sibling differentiation.

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 description implies when to use the tool by saying it closes a block and ends its program, and it includes exclusions such as never closing idle blocks or other blocks. However, it gives no explicit guidance on when to choose this tool over alternatives, nor does it state when not to use it beyond those scope limits.

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