Skip to main content
Glama

list_layers

Read-onlyIdempotent

Lists repository modules grouped by architecture layer and shows the rule that placed each module, helping you understand code organization or decide where new code belongs.

Instructions

Lists the modules of the repository grouped by architecture layer, each with the rule that put it there. Use it to see how the code is organized, or where new code belongs. To check the imports between the layers use check_boundaries; for the plain list of files use list_files. Returns one line per layer, then one line per module of that layer with its language and the rule. It takes no name: its one parameter is all. A repository with more than about 200 modules needs all: true: without it the answer stops after 200 lines, in the middle of a layer, and its last line says how many lines are hidden.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_layers"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoList everything instead of stopping at 200 items.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds genuinely useful behavior: the line-per-layer then line-per-module return shape, and the 200-line truncation that can cut mid-layer with a hidden-count trailer. It does not cover failure modes or cost, so it is a solid but not exceptional supplement.

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 purpose and usage, then return format, then the truncation caveat. Every sentence carries information, though the phrasing 'It takes no name: its one parameter is `all`' is slightly awkward and could be tightened.

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?

With no output schema, the description must explain return values and it does (one line per layer, then per-module lines with language and rule). Combined with the truncation disclosure and named alternatives, an agent has everything needed to call it correctly.

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% for the single boolean 'all', so the baseline is 3, but the description adds real meaning: the ~200-module threshold at which 'all: true' becomes necessary and the concrete consequence of omitting it. This lets an agent decide the parameter value rather than just read its definition.

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?

States a specific verb and resource (lists modules grouped by architecture layer) plus what each entry carries (the rule that put it there). It is clearly distinguishable from list_files (plain file list) and check_boundaries (import checks between layers).

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?

Gives explicit use cases (understanding organization, deciding where new code belongs) and routes the agent elsewhere by name: check_boundaries for inter-layer imports, list_files for the plain list. It also states the condition under which the alternative matters.

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