Skip to main content
Glama

invoke_session

Spawn an isolated specialist agent with its own context window, model/cost tier, prompt, and tools to delegate complex tasks while saving context and cost.

Instructions

Spawn an independent specialist agent in an isolated session with its own context window, model/cost tier, system prompt, and tools. Supports preset personas (agent_preset) and model tiering (fast/balanced/heavy) to save cost while multiplying effective context.

Input Schema

NameRequiredDescriptionDefault
goalNoAlias for initial_message: the task or goal for this isolated session to execute
nameNoHuman-readable name for the specialist agent (optional if agent_preset is provided)
roleNoRole or title of the specialist (optional if agent_preset is provided)
tierNoCost & capability tier: "fast" (low-cost exploration/subtasks), "balanced" (standard implementation), "heavy" (frontier reasoning/auditing)
modelNoExplicit model override (e.g. "claude-sonnet-4-6", "gemini-3.8-flash-high", "gemini-3.8-flash-lite")
providerNoInference provider ("agy", "agy_claude", "gemini", "anthropic", "openai", "ollama")
safety_modeNoSafety execution mode
agent_presetNoPreset specialist from config (e.g. "researcher", "coder", "reviewer", "frontend-designer")
allowed_toolsNoTools the specialist is allowed to use (default: preset tools or all)
system_promptNoInstructions defining the specialist persona (optional if agent_preset is provided)
await_responseNoIf true (default), waits for execution to finish and returns the distilled response. If false, runs asynchronously in background.
max_iterationsNoMax tool-use loops allowed (default: 20)
workspace_pathNoWorkspace directory path for tool execution (default: "./")
initial_messageNoInitial task or message to start execution with
parent_session_idNoID of the calling parent session (default: "parent-session")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose genuinely useful context: the session is isolated with its own context window and its own cost/capability tier. It says nothing about permission/scope limits, concurrency, failure behavior, or that the call can run in the background (that fact only lives in the schema for await_response).

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 sentences, zero waste, front-loaded with the core action and the salient capability (isolated context window) before the secondary cost/tiering rationale.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter tool with no annotations and no output schema, the description is thin. It never says what comes back (a distilled response plus presumably a session ID), and critically it does not explain the async path — if await_response=false, the agent needs to be pointed at get_task_status, list_sessions, or send_session_message to follow up, and nothing here does that.

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 every one of the 15 parameters is already documented in structured form. The description echoes agent_preset and the fast/balanced/heavy tier enum but adds no semantics beyond the schema, so 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?

Specific verb and resource: it spawns an isolated specialist agent session with its own context window, model tier, system prompt, and toolset. An agent can tell what it creates, but the description never distinguishes it from the many adjacent siblings (spawn_agent, start_swarm, invoke_sessions_parallel), all of which sound like they spawn agents too.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gestures at motivation ('to save cost while multiplying effective context') and mentions presets/tiering, but gives no explicit condition for choosing this over spawn_agent or invoke_sessions_parallel, and no when-not guidance. With five spawning/orchestration siblings, this is the dimension that most needed attention and it is absent.

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