Skip to main content
Glama

List theme files

list_theme_files
Read-only

View all files in a WordPress theme or draft with their sizes, letting you assess the template structure before reading or editing it.

Instructions

List the files in a theme (or theme draft) with sizes, so you can see the template structure before reading or editing anything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
themeNoTheme stylesheet or draft id. Defaults to the active theme.
subdirNoRestrict the listing to this subdirectory, e.g. "template-parts".
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds that results include sizes and supports theme drafts, which is useful. It doesn't contradict annotations and provides modest extra context beyond the structured fields.

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 concise sentence that front-loads the action and purpose. No wasted words, and it distinguishes scope clearly. It's appropriately sized for a simple listing tool.

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?

The tool is simple with three optional parameters and no output schema. The description explains the output includes sizes and the purpose is to inspect structure before changes. While it doesn't detail the response format, the purpose is clear and the annotations cover safety. For its complexity, the description is complete enough for an agent 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?

The input schema covers all three parameters with descriptions (100% coverage). The description does not add new information about parameters; it mentions 'theme draft' but the schema already says 'Theme stylesheet or draft id'. Thus the description adds no value beyond the schema, so a baseline 3 is appropriate.

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 states a specific action (list), the object (theme or theme draft files), and the purpose (to see template structure before reading/editing). This clearly distinguishes from sibling tools like read_theme_file (read a single file) and list_themes (list themes themselves).

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 when to use it: before reading or editing theme files, to get an overview. It doesn't explicitly name alternatives, but the context of 'before reading or editing' gives clear usage guidance. However, it doesn't mention when not to use it or alternatives like list_themes for listing themes.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alokemajumder/wpxmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server