Skip to main content
Glama

Ensure Project

ensure_project

Idempotently creates or confirms a project for an absolute human key, so collaborating agents share project identity even without a shared filesystem.

Instructions

Idempotently create or ensure a project exists for the given human key.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "human_key": "<human_key>"
    },
    "name": "ensure_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNo
human_keyYesAn absolute path-like project key (e.g., "/data/projects/backend"), typically the agent's working directory. This MUST be an absolute path, not a relative path or arbitrary slug, but it does NOT need to exist on the local filesystem - it is an opaque project KEY (collaborating agents may not share a filesystem). This is the canonical identifier for the project - all agents using the same key share the same project identity.
identity_modeNoPer-call override of the server's PROJECT_IDENTITY_MODE setting; one of "dir", "git-remote", "git-common-dir", "git-toplevel". Only takes effect when worktree-friendly identity is enabled (WORKTREES_ENABLED=1).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.5
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / human_key / description
      Added value: +"An absolute path-like project key (e.g., \"/data/projects/backend\"), typically the\nagent's working directory. This MUST be an absolute path, not a relative path or\narbitrary slug, but it does NOT need to exist on the local filesystem - it is an\nopaque project KEY (collaborating agents may not share a filesystem).\nThis is the canonical identifier for the project - all agents using the same key\nshare the same project identity."
    • addedInput schema / properties / identity_mode / description
      Added value: +"Per-call override of the server's PROJECT_IDENTITY_MODE setting; one of\n\"dir\", \"git-remote\", \"git-common-dir\", \"git-toplevel\". Only takes effect when\nworktree-friendly identity is enabled (WORKTREES_ENABLED=1)."
  2. First observedv0.3.4

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations present, the description carries the full behavioral burden, and it does disclose the single most important trait: idempotency, so repeated calls do not create duplicates. It does not disclose whether a new project triggers other side effects, what happens to an already-existing project, or any permission requirements. The return shape is presumably covered by the output schema, but the mutation semantics beyond idempotency remain thin.

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?

A single front-loaded sentence with the key attributes (idempotent, create-or-ensure, project, human key) packed in and no filler. Nothing could be removed without losing meaning.

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?

The tool is simple: three parameters, one required, a rich schema, and an output schema that presumably describes the result. The description covers the core purpose and the idempotency contract, which is what an agent needs to decide to call it. Only minor gaps remain around the optional parameters and mutation side effects.

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 67%, with human_key and identity_mode thoroughly documented in the schema itself, including the absolute-path requirement and the identity-mode enum values. The description only echoes "human key" and says nothing about format or identity_mode. The schema is doing the heavy lifting, so the baseline 3 is appropriate.

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?

The description names a concrete verb and resource ("create or ensure a project") scoped to a human key, which is precise enough that an agent can distinguish this from archive_project, hard_delete_project, or register_agent. The qualifier "idempotently" further narrows what kind of creation this is. It stops short of explicitly contrasting with siblings, but the resource is unambiguous.

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?

"Idempotently create or ensure" implies the caller does not need to check existence first and can call this repeatedly, which is meaningful usage context. However, it never states when this should be called versus alternatives like register_agent or how it relates to the archive/unarchive lifecycle. The guidance is implied rather than stated.

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