Skip to main content
Glama

switch_context

Change your agent's active work to a different project or objective. Finish and log current tasks, release file locks, then align to the new target.

Instructions

Switch your work context to a different project or objective.

WHEN TO USE:

  • When the user asks you to work on something different

  • When switching from one task to another in the same conversation

  • When moving between multiple projects

  • After completing one objective and starting a new one

IMPORTANT: This will end your current context and start a new one. Make sure to complete or document any pending work in the current context first.

WORKFLOW:

  1. Complete current work and log changes

  2. unlock_files() - Release any locked files

  3. switch_context() - Switch to new objective (THIS STEP)

  4. lock_files() - Lock files for new work (if needed)

  5. Begin new work

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesYour agent_id from register_agent() (required)
priorityNoPriority level - "critical", "high", "medium", or "low" (default: "medium")medium
to_objectiveYesNew objective statement (required) - e.g., "Add pagination to API"
to_project_idYesTarget project ID (required) - Can be same or different project
task_descriptionNoDetailed description of new work (optional)
Behavior4/5

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

No annotations are provided, so the description carries full responsibility. It clearly warns that the tool will end the current context and start a new one, instructs to complete pending work first, and includes a workflow with unlock/lock files. This goes beyond the basic operation and discloses important side effects.

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 well-structured with WHEN TO USE, IMPORTANT, and WORKFLOW sections. Every sentence adds value, and the format is scannable and front-loaded with the main purpose.

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?

For a state-changing tool with a workflow, the description includes the critical warning about ending context, when-to-use triggers, and a step-by-step workflow. It does not explain return values, but no output schema exists and the operation is straightforward.

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?

Input schema covers 100% of parameters with descriptions, so baseline is 3. The description adds no parameter-specific details, but the schema already documents each field sufficiently (agent_id, priority, to_objective, etc.).

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 'Switch your work context to a different project or objective' with a specific verb and resource. The WHEN TO USE section further distinguishes it from siblings like start_context and end_context, making the purpose unambiguous.

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?

Provides explicit WHEN TO USE list covering common switching scenarios (user request, task change, multi-project work, post-completion). It does not explicitly name alternative tools or when NOT to use, but the context is clear enough for an agent to decide.

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/siddiquesahabaj/CoordMCP'

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