Skip to main content
Glama

Detect repository i18n structure

detect_repository
Read-only

Scan a GitHub repository to detect its framework, locale path patterns, source/target languages, and file format. Use the result to inform create_project and set_repository_patterns. Use the numeric installationId from list_github_installations.

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": {
      "installationId": "<installationId>",
      "owner": "<owner>",
      "repo": "<repo>"
    },
    "name": "detect_repository"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYes
ownerYes
branchNoBranch to scan — normally the primary branch (the first of the watched branches the repository is, or will be, connected with). Defaults to the repository's default branch.
installationIdYesGitHub App installation id

Output Schema

NameRequiredDescriptionDefault
presetYes
messageNoWhat was found instead, when nothing was detected
detectedYesWhether any locale files were found to configure
appGroupsNo
frameworkNo
fileFormatYes
namespacesNo
matchedFilesNo
scoredPresetsYes
sourceLanguageYesnull when no locale file was found
discoveredFilesYes
localeSpellingsNo
targetLanguagesYes
localePathPatternsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedOutput schema / properties / appGroups / items / additionalProperties
      Previous value: -falseNew value: +{}
    • changedOutput schema / properties / discoveredFiles / items / additionalProperties
      Previous value: -falseNew value: +{}
    • changedOutput schema / properties / localeSpellings / items / additionalProperties
      Previous value: -falseNew value: +{}
    • changedOutput schema / properties / namespaces / items / additionalProperties
      Previous value: -falseNew value: +{}
    • changedOutput schema / properties / preset / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "id": {
      -        "type": "string"
      -      },
      -      "name": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "name"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / scoredPresets / items / additionalProperties
      Previous value: -falseNew value: +{}
    • changedOutput schema / properties / scoredPresets / items / properties / preset / additionalProperties
      Previous value: -falseNew value: +{}
  2. Changed1 schema field changed
    • addedInput schema / properties / branch
      Added value: +{
      +  "description": "Branch to scan — normally the primary branch (the first of the watched branches the repository is, or will be, connected with). Defaults to the repository's default branch.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. Changed5 schema fields changed
    • addedOutput schema / properties / detected
      Added value: +{
      +  "description": "Whether any locale files were found to configure",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / message
      Added value: +{
      +  "description": "What was found instead, when nothing was detected",
      +  "type": "string"
      +}
    • addedOutput schema / properties / sourceLanguage / description
      Added value: +"null when no locale file was found"
    • changedOutput schema / properties / sourceLanguage / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "scoredPresets",
      -  "preset",
      -  "sourceLanguage",
      -  "targetLanguages",
      -  "localePathPatterns",
      -  "fileFormat",
      -  "discoveredFiles"
      -]New value: +[
      +  "scoredPresets",
      +  "preset",
      +  "sourceLanguage",
      +  "targetLanguages",
      +  "localePathPatterns",
      +  "fileFormat",
      +  "discoveredFiles",
      +  "detected"
      +]
  4. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true, so safety and external-network behavior are covered. The description adds the prerequisite that installationId must be numeric and traceable to list_github_installations, but says nothing about failure modes (private repo, unsupported framework), possible caching/persistence of scan results, or rate limits on an open-world GitHub call.

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 short sentences, no filler, with the action and detected artifacts front-loaded before the workflow pointers. Every sentence carries distinct information.

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?

With an output schema present, return values need no explanation, and annotations cover the safety profile, so the remaining burden is small. The description supplies the workflow position and input sourcing; only error/edge-case behavior on a failed scan is left unaddressed for a tool that makes an authenticated external call.

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 description coverage is 50%: branch and installationId are documented in the schema, while owner and repo carry only minLength. The description clarifies that installationId is numeric and sourced from list_github_installations, which is genuinely additive, but it does not explain that owner/repo are the GitHub coordinates nor how branch interacts with the default-branch fallback noted in 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?

The description opens with a specific verb ('Scan') and resource ('a GitHub repository') and enumerates exactly what is detected: framework, locale path patterns, source/target languages, and file format. An agent can distinguish this reconnaissance tool from create_project or set_repository_patterns, which merely consume its result.

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 explicitly routes the agent downstream ('Use the result to inform create_project and set_repository_patterns') and upstream ('Use the numeric installationId from list_github_installations'), so the position in the workflow is unambiguous. It stops short of stating when NOT to run a scan (e.g., repo already connected or patterns already known), so it is not a full when/when-not statement.

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.