Skip to main content
Glama

Set project context

set_context
Idempotent

Override the auto-detected project, branch, or PR for the current session when the working directory scope is incorrect; use only to correct session context.

Instructions

Override the auto-detected project, branch or PR for this session. Optional: the project is detected from the working directory, so call it only to correct the scope.

Input Schema

NameRequiredDescriptionDefault
prNoPR number
branchNo
projectNoProject key; omit to keep the detected one
project_nameNoHuman-readable name
project_pathNoAbsolute project path

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, closed-world. The description adds the trait annotations cannot express: the override applies "for this session" and is normally unnecessary because scope is auto-detected. It does not say whether the override can be cleared or how it interacts with later detection, a minor remaining gap.

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, front-loaded with the action and scope, followed immediately by the deferral guidance. No filler and nothing duplicated from the structured fields.

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 five-optional-parameter session setter with no output schema, the description supplies the essential mental model (detected by default, override to correct). It leaves unaddressed whether the override persists across sessions or how a partial override merges with detected values.

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 80%, so the schema already documents pr, project and project_name; the description only restates that project/branch/PR are the settable dimensions. It adds no guidance on project_name vs project_path or which fields drive detection, and branch carries no schema description at all.

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?

Uses a specific verb ("Override") plus the exact resource scope ("project, branch or PR for this session"), which is far more informative than the bare name. It implicitly complements the sibling get_context (read) by being the write/override counterpart, though it does not name any sibling explicitly.

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?

Explicitly states the default path (auto-detection from the working directory) and the narrow condition for calling it: "call it only to correct the scope." That is a clear when-to-use/when-not signal, short only of naming an alternative tool by name.

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