Skip to main content
Glama

Understand a repository or inspect source evidence

analyze_repo
Read-onlyIdempotent

CALL to investigate behavior in public source: supply question and relevant path_hints found from actual usages, for up to four files with commit-pinned line citations. checked_sha selects a commit; base_sha adds before/after excerpts; pr selects a public PR and observes its head's GitHub check runs. source_ranges retrieves missing context at pinned revisions, up to 40 lines per range. Selection is bounded, not exhaustive or proof of compatibility. Without question, returns repository_brief with saved purpose, main parts, starting files, setup, revisions and gaps. Pass exactly one of repo or package. Example: {repo:'expressjs/multer',question:'How are file size limits handled?',path_hints:['lib/make-middleware.js']}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prNoPublic PR number in repo. Requires question. Omit base_sha.
repoNoPublic GitHub repository as owner/repo or a github.com URL.
ownerNoRepository owner, when repo carries only the bare name. Optional: prefer the single owner/repo form in repo.
packageNonpm package name, for example lodash or npm:@scope/pkg. To judge a specific VERSION rather than the package as a whole, use evaluate_dependency_change instead.
base_shaNoCompare source at this base commit; omit when using pr.
questionNo
path_hintsNoScope retrieval to these repository-relative files or directories. Requires question.
checked_shaNoImmutable head revision; required with source_ranges.
source_rangesNoRead only these exact ranges, at most two per file/side and 40 lines per range. Requires question and checked_sha; base side also requires base_sha. Paths must fall within path_hints when supplied. Omit pr for base ranges.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYes
agentYes
statusYes
schema_versionYes
repository_briefNoConcise saved repository orientation shared with the website: purpose, main parts, starting files, setup, revisions and gaps. Null when unavailable; omitted in source-evidence mode.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / repository_brief
      Added value: +{
      +  "description": "Concise saved repository orientation shared with the website: purpose, main parts, starting files, setup, revisions and gaps. Null when unavailable; omitted in source-evidence mode.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / checked_sha / description
      Added value: +"Immutable head revision; required with source_ranges."
    • addedInput schema / properties / source_ranges
      Added value: +{
      +  "description": "Read only these exact ranges, at most two per file/side and 40 lines per range. Requires question and checked_sha; base side also requires base_sha. Paths must fall within path_hints when supplied. Omit pr for base ranges.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "end_line": {
      +        "description": "Last line, inclusive; from start_line through start_line + 39.",
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "path": {
      +        "maxLength": 4096,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "side": {
      +        "default": "head",
      +        "enum": [
      +          "head",
      +          "base"
      +        ],
      +        "type": "string"
      +      },
      +      "start_line": {
      +        "description": "First line, inclusive, 1-based.",
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "path",
      +      "start_line",
      +      "end_line"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 4,
      +  "type": "array"
      +}
  3. Changed5 schema fields changed
    • addedInput schema / properties / base_sha
      Added value: +{
      +  "description": "Compare source at this base commit; omit when using pr.",
      +  "pattern": "^[a-fA-F0-9]{40}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / checked_sha
      Added value: +{
      +  "pattern": "^[a-fA-F0-9]{40}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / path_hints
      Added value: +{
      +  "description": "Scope retrieval to these repository-relative files or directories. Requires question.",
      +  "items": {
      +    "maxLength": 4096,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 4,
      +  "type": "array"
      +}
    • addedInput schema / properties / pr
      Added value: +{
      +  "description": "Public PR number in repo. Requires question. Omit base_sha.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / question
      Added value: +{
      +  "maxLength": 600,
      +  "minLength": 1,
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • addedInput schema / properties / owner
      Added value: +{
      +  "description": "Repository owner, when repo carries only the bare name. Optional: prefer the single owner/repo form in repo.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / package / description
      Previous value: -"npm package name, for example lodash or npm:@scope/pkg."New value: +"npm package name, for example lodash or npm:@scope/pkg. To judge a specific VERSION rather than the package as a whole, use evaluate_dependency_change instead."
  6. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, idempotentHint, destructiveHint=false), but the description adds substantive behavioral limits beyond them: selection is 'bounded, not exhaustive or proof of compatibility', four-file cap, 40-line-per-range cap, commit-pinned citations, and the PR check-run behavior. That is real added context, though it doesn't discuss rate limits or error behavior.

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?

Front-loaded with an imperative 'CALL to investigate behavior in public source', then proceeds through parameter behaviors in a logical order. It is dense and semicolon-heavy, packing multiple constraints per sentence, but nearly every clause carries a distinct, load-bearing fact rather than 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 nine-parameter tool with nested source_ranges and a declared output schema, the description covers the essential mode interactions (pr vs base_sha, question-required modes, one-of repo/package) and even summarizes repository_brief. Combined with the existing output schema, an agent has enough to invoke it correctly, with only minor gaps around failure modes.

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 description coverage is 89%, so the baseline is 3 and the schema already documents most parameters. The description still adds cross-cutting semantics: how checked_sha/base_sha/pr/source_ranges combine, the before/after excerpt behavior, and the precise 'up to 40 lines per range' retrieval bound. This is meaningful beyond the schema's per-field text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: investigate behavior in public source via question + path_hints, returning commit-pinned line citations. The scope (up to four files, bounded selection) is precise. It does not, however, name or distinguish itself from any sibling such as compare_repos or check_change_risk, so an agent still has to infer the boundary.

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 clear operational context for each mode: checked_sha selects a commit, base_sha adds before/after excerpts, pr selects a public PR and observes its check runs, source_ranges fills missing context, and omitting question yields repository_brief. It also states 'Pass exactly one of repo or package.' It stops short of explicit when-not guidance or naming an alternative tool.

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.

Resources