Skip to main content
Glama

Relate repositories

relate_repositories
Destructive

State that two repositories are related for AI code review, so a review of either may read the other. Organisation admins only. Use it for what the deploy graph cannot connect - a client and the API it calls, a shared library, a repository outside Ankra's deploy; applications installed on the same cluster are already related with no statement. The relationship is symmetric, so there is no mirror to add, and re-stating a pair changes nothing. Both repositories must be ones the named GitHub App installation can reach: Ankra checks that installation's live repository listing and refuses the pair otherwise, because the review fetches a related repository with that installation's own token. Returns the stored relationship.

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": {
      "installation_id": "<installation_id>",
      "repository": "<repository>",
      "related_repository": "<related_repository>"
    },
    "name": "relate_repositories"
  }
}

Input Schema

NameRequiredDescriptionDefault
repositoryYesRepository path, owner/name.
installation_idYesNumeric id of the GitHub App installation the relationship belongs to, as a string. list_credentials with provider github reports installation_id for every GitHub App credential.
related_repositoryYesThe other repository, owner/name. The relationship is symmetric, so which one is which does not matter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior2/5

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

Most behavioral disclosure is excellent: it explains the permission requirement, the live GitHub App installation listing check, and why that check exists (the review fetches with that installation's own token). However, "re-stating a pair changes nothing" asserts idempotent behavior, which conflicts with the annotation idempotentHint=false — an agent deciding whether to retry or to add the mirror pair gets contradictory signals. The rich auth/token context keeps this above a 1, but the direct conflict with a supplied annotation caps it.

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?

Purpose is front-loaded in the first sentence, then constraints, then semantics, then the return — a sensible order. Every sentence carries information, though a couple of long multi-clause sentences (the deploy-graph one, the installation-check one) could be split for faster scanning.

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

Completeness5/5

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

For a 3-parameter mutation with no output schema and annotations that only flag safety, the description covers permissions, validation behavior on failure, symmetry/idempotency semantics, and what is returned ("Returns the stored relationship"). Nothing an agent needs to call this correctly is missing, apart from reconciling the idempotency wording.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description adds real meaning on top: installation_id is tied to a verified live repository listing and to the token used at review time, and the symmetry note re-frames which argument is "which." It stops short of formatting detail, but the schema already supplies that.

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+resource+effect: "State that two repositories are related for AI code review, so a review of either may read the other." It goes beyond naming the operation to state the downstream consequence, which distinguishes it from list_related_repositories and unrelate_repositories. An agent knows exactly what this call accomplishes without opening the schema.

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 gives concrete positive cases (client and the API it calls, a shared library, a repo outside Ankra's deploy) and an explicit exclusion (applications on the same cluster are already related with no statement), plus an authorization gate ("Organisation admins only"). That is when-to-use and when-not-to-use in a single paragraph, with no inference required.

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.