Skip to main content
Glama

detect_forge

Detects a repository's Git host (GitHub or GitLab) and checks whether the matching CLI is installed and signed in. Use it read-only before creating a goal.

Instructions

Which git host a folder's repo is on (github, gitlab, or null when it has no origin remote or neither CLI knows the host), and whether that host's CLI (gh, glab) is installed and signed in. Read-only. For the quarterdeck-goals plugin's /goal-new.

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": {
      "working_dir": "<working_dir>"
    },
    "name": "detect_forge"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_scopeNoA goal run passes its run id here; anyone else leaves it out.
working_dirYesThe repo's folder (absolute path)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.32.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does declare 'Read-only' plus the exact fallback semantics that produce a null result — behavior an agent could not infer from the schema. It stops short of saying how detection is performed (shelling out to git/gh/glab, possible latency or network/auth dependence), which leaves some ambiguity for a tool that inspects CLI login state.

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?

The primary capability is front-loaded in the first clause, with the read-only note and caller context trailing as short fragments — no filler. The long parenthetical enumerating the null conditions is dense on first read but every word there is decision-relevant.

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 two-parameter, annotation-free, no-output-schema tool, the description covers the return shape (host identifier or null, plus CLI installed/signed-in state) and the edge case that produces null. It leaves the precise response format unspecified, but with no output schema that is a modest gap rather than a blocking one.

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 both parameters are already documented, and the description adds only the implicit link between 'a folder's repo' and working_dir. The run_scope parameter (pass the run id during a goal run, omit otherwise) is stated in the schema but receives no elaboration in the description.

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 names a concrete detection task: which git host a folder's repo uses (github, gitlab, or null) and whether that host's CLI is installed and signed in. It even defines the null case (no origin remote, or no CLI recognizes the host), so an agent knows exactly what answer it gets. No sibling in the catalog does host/CLI detection, so it is inherently distinguishable.

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 scopes intended usage clearly with 'For the quarterdeck-goals plugin's /goal-new,' which tells an agent this is a pre-flight check inside the goal-creation flow rather than a general-purpose probe. There are no explicit when-not conditions or named alternatives, but none of the siblings overlap with this capability, so the guidance is adequate.

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