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. A GitHub repository with no Project is set up with preview_workflow_setup and set_up_workflow; this tool stays for a repository a Project already translates.

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": {
      "projectId": "<projectId>",
      "gitUrl": "<gitUrl>",
      "provider": "<provider>"
    },
    "name": "connect_repository"
  }
}

Input 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

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. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. 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."
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), it discloses real side effects: webhook registration and a best-effort namespace discovery pass. It stops short of covering idempotency or what happens on re-connect to an already-connected repo.

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?

Four dense sentences, all load-bearing, with the core action and its alternatives front-loaded. A little crowded in a single unbroken paragraph, but no filler.

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

Completeness3/5

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

With 9 parameters and only 56% schema coverage, the definition should explain the import enum pair (ignore/reviewed/translated, new_keys_only/all_keys) since those materially change what gets imported. Annotations and the output schema relieve some burden, but the mutation's import behavior is left for the agent to infer.

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 56%, so the description is partly responsible for parameter meaning. It explains the patterns concept and where githubInstallationId comes from, but says nothing about importMode, importScope, or branches — the enum-heavy params whose behavior an agent most needs to choose correctly.

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 ("Connect a Git repository to a project") plus the optional locale-pattern variant. It also explicitly distinguishes itself from preview_workflow_setup and set_up_workflow by stating it is the tool for a repository a Project already translates.

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?

It names the exact alternative path for a GitHub repository with no Project (preview_workflow_setup then set_up_workflow) and states the condition that selects this tool instead. It also gives the prerequisite step for GitHub auth (githubInstallationId from list_github_installations).

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.