Inicio - Documentación - POM AI - 19 MCP - POM Theme setting tools - `pom_theme_get_generated_css`: inspect generated CSS

pom_theme_get_generated_css: inspect generated CSS

Reports on website.min.css — the compiled stylesheet the site actually serves.

Arguments

Argument Required Meaning
include_content No Return part of the file's contents
content_limit No How many characters, clamped to 1,000–20,000; defaults to 5,000

Permissions

mcp:read and pom_theme:read, plus edit_theme_options.

What it returns

Field Meaning
file The path on disk
url The public URL browsers request
exists Whether the file is there
size Its size in bytes
filemtime When it was last built
version The asset version string used for cache-busting
content The first slice of the file, if requested

filemtime answers "did my change take effect?"

This is the field the tool exists for. Every CSS write regenerates this file; if the timestamp did not move, the regeneration did not happen and the site is still serving the previous build.

The sequence for diagnosing "I changed the CSS and nothing happened":

  1. Read this tool — did filemtime move after the write?
  2. If not, the rebuild failed. Run pom_theme_generate_assets.
  3. If it did, the file is current and the problem is caching — page cache, CDN, or the browser.

That splits a vague complaint into two very different problems.

content is a prefix, not the file

include_content returns the first slice of the stylesheet, up to content_limit characters, capped at 20,000. A compiled POM Theme stylesheet is far larger than that.

So you cannot search this response for a rule and conclude it is absent — you have only seen the beginning. There is no offset argument and no way to read the rest.

Use it to confirm the file looks like a real compiled stylesheet, not to audit its contents. To check what your own CSS contains, read the source with pom_theme_get_global_css and pom_theme_get_custom_css.

Leave include_content off unless you need it; the response is otherwise small.

exists false is a broken site

The theme expects this file. If it is missing, pages load without the compiled styling.

Usual causes: the uploads directory is not writable, or assets have never been generated on this installation — common right after a migration, where settings came across in the database and generated files did not.

The fix is pom_theme_generate_assets, and if that does not produce the file, the problem is filesystem permissions.

version is what busts caches

Browsers and CDNs key on this string. A change to the file with an unchanged version can leave visitors on the old stylesheet until they hard-refresh.

If filemtime moved but visitors still see old styling, compare the version against what the site's HTML is requesting.

size sanity-checks a build

A compiled stylesheet that suddenly drops to a few hundred bytes usually means the build failed partway. Comparing size before and after a regeneration is a quick health check.

url is public

The compiled stylesheet is served to every visitor, so nothing in it is confidential. The file path, however, reveals server directory structure — redact it before sharing diagnostics. See Safe support information.

Using it well

After any CSS change:

Check the generated CSS and tell me whether it was rebuilt just now.

On an unfamiliar site:

Does the generated stylesheet exist, and how big is it?

Common problems

Symptom Cause
The tool is missing POM Theme is not available
pom_ai_mcp_forbidden Missing edit_theme_options
exists is false Never generated, or the uploads directory is not writable
filemtime did not move after a write The rebuild did not run
A rule you expect is not in content You only saw the first slice
Correct file, stale site Cache, CDN, or the asset version
Suspiciously small size The build failed partway

Related