Skip to main content
Glama

Set Project Dir

set_project_dir

Rebind the MCP session to a specified project root when the working directory is wrong. All subsequent tool calls use this directory without editing mcp.json or restarting.

Instructions

Pin the project root for this MCP session.

Useful when the MCP process was spawned with the wrong working directory — typical symptom: unbound_report shows a project path like C:\Users\<you> instead of the workspace you actually opened in Cursor. Calling this tool once re-binds every subsequent tool call to the given directory, without editing mcp.json or restarting Cursor.

Safe to call while UNBOUND — re-pointing at a directory is not a role-claim and writes nothing. It only mutates in-process state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesabsolute path to the project root (the directory that should contain ``docs/agents/`` and ``.cursor/rules/``). The directory must exist; it does not need to be an already-initialized FCoP project.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.4

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden of revealing side effects. It explicitly states that the tool writes nothing, is safe to call while UNBOUND, is not a role-claim, only mutates in-process state, and affects every subsequent tool call but not mcp.json or the running Cursor process.

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 front-loaded with the single-sentence purpose and each subsequent sentence adds distinct value: when to use it, what it changes, and what it does not do. It is compact with no filler or repeated material.

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

Completeness5/5

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

For a one-parameter, session-scoped configuration tool with an output schema, the definition covers the required scenario, the operational effect, the safety profile, and the parameter constraints. Nothing essential is missing for an agent to select and invoke it correctly.

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% and the path parameter is already well-documented in the schema, including absolute path, expected contents, and existence requirement. The tool description reinforces that the path is the project root used for re-binding, but adds no new parameter-level meaning beyond the schema. Baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Pin the project root for this MCP session.' It goes on to say the tool re-binds every subsequent tool call to the given directory without editing mcp.json or restarting Cursor, which clearly separates it from configuration and project-lifecycle siblings like init_project or new_workspace.

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?

It gives a concrete when-to-use context: when the MCP process was spawned with the wrong working directory, and identifies the typical symptom via unbound_report showing a user path instead of the Cursor workspace. It does not name alternative tools, but the described use case is specific enough that an agent can decide when this tool is appropriate.

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