Skip to main content
Glama

region_end

Destructive

Close an open named region and return its duration in milliseconds, removing it from the active set.

Instructions

Close an open named region and return its duration in ms. Removes the region from the active set; subsequent region_end with the same name returns an error.

Returns: { ended: bool, name: string, duration_ms: float, duration_s: float }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRegion identifier. Must match an open region.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false; the description adds real value beyond them by explaining what actually happens (region removed from the active set, repeat calls with the same name error). It stops short of naming permission requirements or concurrency limits, so it is good but not exhaustive.

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?

Two tightly written sentences plus a return-shape line, with the core action front-loaded. Every clause earns its place: the closure semantics, the error condition, and the return fields.

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?

The risk (destructive, non-idempotent) is covered by annotations, and with no output schema present the description supplies the return object shape itself. Combined with the error-condition note for the single param, an agent has everything needed to invoke this correctly.

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 schema already states 'Must match an open region', so the single parameter is fully documented by structured data. The description adds no syntax, format, or naming details beyond the schema, which is the expected baseline 3 when the schema carries the load.

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 ('Close an open named region') plus the return value (duration in ms). The name 'region_end' pairs cleanly with the sibling 'region_start', so an agent can distinguish the two roles without opening either schema.

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?

Usage is clearly implied: this closes a region opened elsewhere and errors on a non-open name, which tells the agent it must be paired with a prior open. It does not explicitly name 'region_start' or 'list_active_regions' as alternatives, but the context is unambiguous for a profiling lifecycle tool.

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

Deploy Server

Other Tools