Skip to main content
Glama

set_session_control

Idempotent

Pause an AI session or hand it to a human by setting its control mode to suspended or manual_handoff, with an optional expiry that automatically resumes engaged.

Instructions

Define o modo de controle de uma sessão específica (engaged | suspended | manual_handoff). Quando != engaged, o gate sessionControlGate curto-circuita o agent loop sem consumir quota. Use suspended pra pausar; manual_handoff pra sinalizar que atendimento humano assumiu. Com expires_at a pausa é temporária: no prazo a sessão volta sozinha para engaged.

Input Schema

NameRequiredDescriptionDefault
modeYesengaged = volta ao normal; suspended = pausa; manual_handoff = humano assumiu
reasonNoMotivo opcional (audit/telemetria)
messageNoCanned message opcional. Vazia = ACK silencioso (default). Só aplicada quando mode != engaged.
expires_atNoPrazo opcional (ISO 8601 com fuso, ex.: 2026-10-05T12:00:00Z; no máximo 30 dias) para mode suspended/manual_handoff. No prazo a sessão volta para engaged sozinha. Omitido = sem prazo — e uma nova chamada sem expires_at APAGA o prazo anterior (repita o prazo para só trocar a mensagem).
session_idYessession_id text (ou UUID id) da sessão

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.2
    • addedInput schema / properties / expires_at
      Added value: +{
      +  "description": "Prazo opcional (ISO 8601 com fuso, ex.: 2026-10-05T12:00:00Z; no máximo 30 dias) para mode suspended/manual_handoff. No prazo a sessão volta para engaged sozinha. Omitido = sem prazo — e uma nova chamada sem expires_at APAGA o prazo anterior (repita o prazo para só trocar a mensagem).",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare non-readOnly, idempotent, non-destructive, closed-world. The description adds real behavioral context beyond them: the sessionControlGate short-circuits the agent loop without consuming quota when mode != engaged, and expires_at makes the pause self-reverting. It does not state auth/permission requirements, so not a 5.

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?

A single tight paragraph, front-loaded with the verb, the mode enum, and the quota/gate behavior, then the expires_at nuance. Every sentence contributes; slightly dense but no filler.

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?

With annotations covering the safety profile and a fully described schema, the description supplies the remaining behavioral essentials (gate short-circuit, quota avoidance, auto-revert). Return values are irrelevant since no output schema exists; only explicit permission requirements are 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 the baseline is 3 and the schema already documents mode, reason, message, expires_at, and the erase-on-omission deadline rule. The description only echoes the mode and expires_at meaning already present in the schema, adding no syntax or format detail the agent lacks.

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 (set the control mode) and the exact resource (a specific session), then enumerates the three valid modes inline. An agent can tell what this does and which values are legal without opening the 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?

Gives concrete per-mode guidance: 'suspended' to pause, 'manual_handoff' to signal a human took over, and 'engaged' to return to normal. It stops short of naming when NOT to use it or distinguishing it from the similarly named sibling set_engagement_control, so it is clear but leaves one routing gap.

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