Skip to main content
Glama

Connect a repository to a project

connect_repository

Connect a Git repository to a project, optionally with locale path patterns. For GitHub, pass the githubInstallationId from list_github_installations. Registers webhooks and runs best-effort namespace discovery.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gitUrlYesHTTPS git URL of the repository
branchesNoWatched branches, ordered; the first entry is the primary branch — the one scans, the Translations default ref and target-file templates read. Pushes to every entry are translated. No name may repeat.
patternsNo
providerYes
projectIdYesThe project to connect the repository to
importModeNoignore
importScopeNonew_keys_only
gitlabConnectionIdNoRequired for GitLab repositories
githubInstallationIdNoRequired for GitHub repositories

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
gitUrlYes
branchesYesWatched branches, in order. The first entry is the primary branch.
providerYes'github' or 'gitlab'
projectIdYes
repoPatternsYes
webhookSecretYesShown once — the secret the provider signs deliveries with

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / branches / description
      Added value: +"Watched branches, ordered; the first entry is the primary branch — the one scans, the Translations default ref and target-file templates read. Pushes to every entry are translated. No name may repeat."
    • addedInput schema / properties / branches / uniqueItems
      Added value: +true
    • addedOutput schema / properties / branches / description
      Added value: +"Watched branches, in order. The first entry is the primary branch."
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare it as a non-read-only, non-destructive, open-world write, and the description adds real side-effect context beyond them: 'Registers webhooks and runs best-effort namespace discovery.' That 'best-effort' qualifier usefully signals the discovery may not fully succeed. It omits auth/permission details and whether re-connecting an existing repo is idempotent.

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?

Three tight sentences, front-loaded with the core action, then the prerequisite, then side effects. Every sentence earns its place with no 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?

For a complex 9-param write operation, it covers purpose, the GitHub prerequisite, and side effects, and an output schema exists so return values needn't be described. It is slightly thin on the import-mode/scope and branch-selection semantics, which the schema handles only partially.

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 only 56% across 9 params, so the description must compensate more than it does. It clarifies the patterns param ('optionally with locale path patterns') and the GitHub installation id source, but leaves branches, provider, importMode, importScope, and gitlabConnectionId behavior unexplained beyond the schema itself.

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?

States a specific verb+resource ('Connect a Git repository to a project') and scopes it ('optionally with locale path patterns'). This is clearly distinguishable from siblings like detect_repository or set_repository_patterns, which do different things to an already-connected repo.

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?

Gives a concrete routing hint: 'For GitHub, pass the githubInstallationId from list_github_installations', pointing to the sibling that supplies a required identifier. It provides clear context but stops short of explicit when/when-not guidance or naming alternatives (e.g., detect_repository first).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.