Skip to main content
Glama

Analyze project

analyze
Read-onlyIdempotent

Measure a redacted project selection and list its largest text files by estimated tokens to identify context-heavy files.

Instructions

Measure a redacted project selection and list its largest text files by estimated tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsNoExisting project-relative files or directories that narrow the selection.
branchNoOptional Git branch for a remote project URL; invalid for local project paths.
detailNoCollapse code to signatures or strip comments/blank lines to fit large projects into a budget; unsupported languages are returned unchanged.full
profileNoSelection profile: 'standard', 'local', or a portable profile JSON path inside the project root.
projectNoAbsolute root path returned by list_projects, or a Git URL when the server allows remote sources. Optional only when one local root is configured.
git_scopeNoFurther restrict results to staged files, all current changes, or files changed between two Git refs.
top_filesNoNumber of largest text files to return by estimated tokens; default 10; integer or numeric string.
tracked_onlyNoRestrict results to files tracked by Git; accepts a boolean or the string 'true' or 'false'.
max_file_bytesNoExclude otherwise selected files strictly larger than this byte count; integer or numeric string.
exclude_patternsNoProject-relative glob patterns using '/' to exclude additional paths.
include_patternsNoProject-relative glob patterns using '/'. They only narrow built-in and gitignore filtering.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
detailYes
tokensYes
topFilesYes
charactersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is well covered. The description adds the behavioral detail that it 'measures' a 'redacted project selection' and lists largest text files by estimated tokens, which is useful beyond the annotations. However, it does not disclose details like whether results are returned as a list or a package, how 'redacted' affects results, or whether remote URLs are allowed despite the parameter description mentioning them.

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 one tight sentence that states the core outcome without padding or repetition. It earns its place by adding the 'redacted project selection' constraint and 'largest text files by estimated tokens' outcome, which are not fully visible in the schema.

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?

Given 11 optional parameters and rich annotations, the description could still explain how analyze relates to pack_context or list_projects, and what 'redacted' means in practice. An output schema exists, so return values are partly covered, but the meaning of selection scoping and the use of the project parameter are not sufficiently clarified. Still, with all parameters documented and safety annotations present, the definition is mostly complete for a capable agent.

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 100%, so the baseline is 3. The description itself adds almost no parameter-level meaning beyond what the schema already provides, and it doesn't clarify how the complex fields like git_scope, include_patterns, or exclude_patterns interact. The description is not misleading, but it does not compensate for the interpretive burden of 11 optional parameters.

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?

The description says 'Measure a redacted project selection and list its largest text files by estimated tokens,' which states a specific action and result, but it doesn't fully distinguish how this differs from sibling tools like search_project or get_tree. 'Redacted project selection' is an unusual term and the intended scope isn't immediately obvious without looking at parameters.

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?

The description implies usage for measuring and listing large files, but it does not explicitly state when to choose analyze over siblings like pack_context or search_project. The mention of 'redacted project selection' suggests a scoping behavior, but no exclusions or alternatives are named. This is still clearer than nothing but leaves the tool-selection decision to inference.

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