Skip to main content
Glama

analyze_repository

Analyzes git-tracked TS/JS files to produce a structural summary: counts of classes, methods, functions, exports, top files by declarations, and call-resolution stats (exact vs ambiguous).

Instructions

Parses the git-tracked TypeScript and JavaScript files in the current repository via ts-morph and returns a structural summary: file, class, method, function and exported-function counts, a per-file breakdown (capped at 100 files, ranked by declaration count), and call-resolution statistics showing how many call sites the TypeScript checker resolved exactly versus left ambiguous. Untracked and ignored files are excluded. Results are cached until a source file changes on disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses important behavior: it parses files (implying read-only), excludes untracked/ignored files, and caches results until source files change. It does not explicitly state it makes no modifications, but the wording strongly implies a read-only analysis.

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?

The description is a single, dense, well-organized sentence that covers purpose, scope, exclusions, output details, and caching without unnecessary fluff. It is information-dense yet easy to follow.

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?

Since there is no output schema, the description must explain what the tool returns. It does so thoroughly: counts, per-file breakdown with a cap, ranking criteria, and call-resolution statistics. It also notes exclusions and caching behavior, making the tool's behavior fully understandable.

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?

The tool has no parameters in the schema, so parameter explanation is not needed. The description focuses on behavior and output, which is appropriate for a parameterless tool.

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 clearly states the specific action (parses git-tracked TypeScript and JavaScript files via ts-morph) and the resource (the current repository). It also details the output (structural summary, counts, per-file breakdown, call-resolution statistics), making it easy to distinguish from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (to analyze repository structure and get call-resolution stats) but does not explicitly state when to prefer it over alternatives or mention any exclusions. No sibling tools are referenced.

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