Skip to main content
Glama

List theme files

wp_list_theme_files
Read-onlyIdempotent

List the files inside an installed theme (defaults to the active theme), recursively. A theme is named by its folder as wp_list_themes lists it; a path outside the theme directories is refused. Returns theme (the name the other theme tools take) and files: paths relative to the theme folder, sorted, at most 800 (the answer does not say whether more exist); a file's content is read by wp_read_theme_file. A theme that is not installed is an error naming the cause. Requires edit_themes; runs only with the site's write access on. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
themeNoInstalled theme, by its folder name as wp_list_themes lists it ("collection/theme" for a theme inside a collection). A theme WordPress counts as broken (for example a folder without style.css in wp-content/themes) can be named too, although wp_list_themes leaves it out. Default: the active theme.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: discloses the edit_themes capability requirement, that it only runs when the site's write access is on, that it is forwarded by AlphaBridge Connect to one site, the 800-item cap with the caveat that truncation is not signaled, and that a missing theme is an error naming the cause.

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-loads purpose, then constraints, then return shape, then permissions. Dense and mostly waste-free, though the single run-on paragraph packs routing/deployment detail (AlphaBridge Connect) that could be separated.

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?

No output schema exists, so the description carries the return contract itself and does: returns theme plus relative sorted file paths, capped at 800 with unknown remainder. Combined with permission and error behavior, 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.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already explains folder-name format, collection/theme form, broken-theme edge case, and the active-theme default. The description only restates the naming convention, adding little beyond the schema, so baseline 3 applies.

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+resource+scope: 'List the files inside an installed theme (defaults to the active theme), recursively.' It also disambiguates from siblings by naming wp_list_themes (naming source) and wp_read_theme_file (content reader).

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 selection context: use this to enumerate paths, then wp_read_theme_file for content; theme names come from wp_list_themes; paths outside theme directories are refused. No explicit exclusion of alternatives beyond that, so short of a 5.

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