Skip to main content
Glama

resolve_project

Resolve the current Hub project from a workspace path or slug at session start, optionally creating a local registry entry. Prevents losing project context before running session_digest.

Instructions

Resolve the current Hub project from a workspace path or slug.

    Use at session start before session_digest. With create_if_missing=true,
    this may create a local project registry entry; false prevents creation.
    An existing project_slug with workspace_path still registers that path.
    Use upsert_project for explicit metadata or forge configuration changes.
    

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "resolve_project"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoDisplay title for a newly created project; defaults to slug or workspace basename. Does not rename an existing project.
project_slugNoProject identifier, checked before workspace_path; missing slugs are normalized on creation.
workspace_pathNoClient workspace folder path, matched to registered paths or basename; may be registered when project_slug resolves.
create_if_missingNoDefaults to true: create a missing registry entry. False prevents creation, but an existing slug may gain workspace_path.

Output Schema

NameRequiredDescriptionDefault
slugNo
tagsNo
errorNoPresent only when no project was resolved.
titleNo
repo_urlNo
created_atNo
forge_repoNo
sort_orderNo
updated_atNo
archived_atNo
descriptionNo
forge_ownerNo
parent_slugNo
default_energyNo
forge_wiki_pathNo
workspace_pathsNo
forge_project_idNo
default_work_sourceNo
forge_connection_profile_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.22.0
    • addedInput schema / properties / create_if_missing / description
      Added value: +"Defaults to true: create a missing registry entry. False prevents creation, but an existing slug may gain workspace_path."
    • addedInput schema / properties / project_slug / description
      Added value: +"Project identifier, checked before workspace_path; missing slugs are normalized on creation."
    • addedInput schema / properties / title / description
      Added value: +"Display title for a newly created project; defaults to slug or workspace basename. Does not rename an existing project."
    • addedInput schema / properties / workspace_path / description
      Added value: +"Client workspace folder path, matched to registered paths or basename; may be registered when project_slug resolves."
    • addedOutput schema / $defs
      Added value: +{
      +  "EnergyLevel": {
      +    "enum": [
      +      "low",
      +      "medium",
      +      "high",
      +      "unknown"
      +    ],
      +    "title": "EnergyLevel",
      +    "type": "string"
      +  },
      +  "WorkSource": {
      +    "enum": [
      +      "local",
      +      "github",
      +      "gitea"
      +    ],
      +    "title": "WorkSource",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / description
      Added value: +"Resolved registry project on success; only error on lookup failure."
    • addedOutput schema / properties
      Added value: +{
      +  "archived_at": {
      +    "anyOf": [
      +      {
      +        "format": "date-time",
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Archived At"
      +  },
      +  "created_at": {
      +    "format": "date-time",
      +    "title": "Created At",
      +    "type": "string"
      +  },
      +  "default_energy": {
      +    "$ref": "#/$defs/EnergyLevel"
      +  },
      +  "default_work_source": {
      +    "$ref": "#/$defs/WorkSource"
      +  },
      +  "description": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Description"
      +  },
      +  "error": {
      +    "description": "Present only when no project was resolved.",
      +    "title": "Error",
      +    "type": "string"
      +  },
      +  "forge_connection_profile_id": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Forge Connection Profile Id"
      +  },
      +  "forge_owner": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Forge Owner"
      +  },
      +  "forge_project_id": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Forge Project Id"
      +  },
      +  "forge_repo": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Forge Repo"
      +  },
      +  "forge_wiki_path": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Forge Wiki Path"
      +  },
      +  "parent_slug": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Parent Slug"
      +  },
      +  "repo_url": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Repo Url"
      +  },
      +  "slug": {
      +    "title": "Slug",
      +    "type": "string"
      +  },
      +  "sort_order": {
      +    "title": "Sort Order",
      +    "type": "integer"
      +  },
      +  "tags": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "title": "Tags",
      +    "type": "array"
      +  },
      +  "title": {
      +    "title": "Title",
      +    "type": "string"
      +  },
      +  "updated_at": {
      +    "format": "date-time",
      +    "title": "Updated At",
      +    "type": "string"
      +  },
      +  "workspace_paths": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "title": "Workspace Paths",
      +    "type": "array"
      +  }
      +}
    • changedOutput schema / title
      Previous value: -"resolve_projectDictOutput"New value: +"ProjectResult"
  2. First observedv0.12.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=false; the description adds the crucial side effect that this may create a local registry entry and that an existing slug plus workspace_path still registers the path. It leaves some behavior implicit, such as what happens when a path matches multiple projects, but the mutation surface is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with purpose, then timing, then the mutation caveat, then the sibling redirect. The stray indentation and trailing newline are cosmetic; no sentence is filler.

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?

An output schema exists and all four parameters are documented, so the description only needs to carry ordering and side-effect context, which it does. Ambiguity handling for non-matching or multi-matching workspaces is the only notable omission.

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 each parameter is already documented in the input schema, and the description largely restates the create_if_missing and slug-plus-path behavior. It adds only mild cross-parameter framing (slug checked with workspace_path causing registration) rather than new syntax or precedence detail beyond the schema.

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?

Opens with a specific verb+resource ('Resolve the current Hub project') and names the two lookup keys (workspace path or slug). It also contrasts itself with the sibling upsert_project, so an agent can separate it from the write-heavy project tools without opening schemas.

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

Usage Guidelines5/5

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

Gives explicit invocation timing ('at session start before session_digest') and a named alternative ('Use upsert_project for explicit metadata or forge configuration changes'). The create_if_missing true/false consequences are spelled out, so the agent knows the behavioral fork before calling.

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