Skip to main content
Glama

set_project_root

Idempotent

Register a project root and make it active for symbol-based code navigation; re-registering switches roots without reindexing unless force is true.

Instructions

Register a new project root and switch to it. If the path is already registered, this becomes a cheap active-root switch (no reindex) unless force=true is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoAlias de `path`. Absolute path to the project root directory.
pathNoAbsolute path to the project root directory.
rootNoAlias de `path`. Absolute path to the project root directory.
forceNoRebuild the index even if the project is already registered.
projectNoAlias de `path`. Absolute path to the project root directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv4.20.0
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "required": [
      +      "path"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "project"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "name"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "root"
      +    ]
      +  }
      +]
    • addedInput schema / properties / name
      Added value: +{
      +  "description": "Alias de `path`. Absolute path to the project root directory.",
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Alias de `path`. Absolute path to the project root directory.",
      +  "type": "string"
      +}
    • addedInput schema / properties / root
      Added value: +{
      +  "description": "Alias de `path`. Absolute path to the project root directory.",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "path"
      -]
  2. Addedv4.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations cover the safety profile (idempotent, non-destructive, not read-only), and the description adds real value on top: reindexing is skipped for already-registered paths unless force=true. It stops short of saying what happens to the previously active root or whether the index is built for a brand-new path.

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, no waste, and the primary action is front-loaded ahead of the conditional exception. Nothing needs to be cut or reordered.

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 5-param, no-output-schema tool with full annotation coverage, the description covers the essential behavior including the force override. The remaining gap is the unclear relationship to the switch_project sibling, which an agent must guess at.

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 coverage is 100%, so path and its three aliases (name, project, root) are fully documented in the schema. The description's mention of force largely restates the schema's "Rebuild the index even if the project is already registered" rather than adding syntax or format detail, 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?

States a specific verb and resource: "Register a new project root and switch to it," which tells an agent exactly what happens. It does not, however, differentiate itself from the sibling switch_project or reindex, leaving the boundary between them to inference.

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

Usage Guidelines3/5

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

The description gives conditional behavior (already-registered path becomes a cheap switch) which implies usage, but it never says when to prefer set_project_root over switch_project, list_projects, or reindex. The usage guidance is inferred rather than stated.

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