Skip to main content
Glama

WordPress: Wp theme file read

wordpress_specialist_wp_theme_file_read
Read-only

Read a WordPress theme file as base64 with path and size checks, returning content, MIME type, size, SHA-256, and modification time for safe theme inspection.

Instructions

[UNIFIED] Read a file inside a theme as base64. Returns {content_base64, mime, size, sha256, modified_at}. Path must resolve under wp-content/themes/{theme_slug} (S-16); .., absolute paths, null bytes, and symlinks that escape are rejected by the companion's realpath gate. Files larger than 5 MB return file_too_large (S-18). Requires Airano MCP Bridge v2.14.0+.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "theme_slug": "<theme_slug>",
      "path": "<path>"
    },
    "name": "wordpress_specialist_wp_theme_file_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
siteYes
theme_slugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond readOnlyHint=true, the description discloses the realpath gate behavior, the specific classes of rejected paths (.., absolute, null bytes, escaping symlinks), the 5 MB ceiling with its `file_too_large` error code, and a minimum bridge version requirement. These are exactly the operational traits an agent cannot get from annotations.

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 the action and return shape, then constraints in descending priority; there is little filler. The internal rule tags (S-16, S-18) are noise to an agent but do not obscure the meaning.

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?

With no output schema, the description correctly enumerates the response keys, and the size/security failure modes are covered. The only real hole is the undocumented `site` parameter and the absence of any sibling routing hint.

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 0%, so the description must carry all three parameters. It explains `path` thoroughly (resolution root, rejection rules) and implies `theme_slug` through the `wp-content/themes/{theme_slug}` template, but `site` is never described at all, leaving one of three required inputs undefined.

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?

"Read a file inside a theme as base64" gives a specific verb (read), resource (theme file), and output encoding, which cleanly separates it from the file_write/patch/delete siblings. The return shape is stated up front so an agent knows what comes back.

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?

Usage is implied by the read-only nature and by the path-confinement rules, but there is no explicit guidance such as "use wp_theme_file_list to discover paths" or any stated precondition for choosing this tool over its siblings. Constraints on valid input are given; when-to-use routing is not.

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

Deploy Server

Other Tools