Skip to main content
Glama

Theme Template Overrides

theme_template_overrides

Identify which Drupal core or module Twig templates a theme overrides and which are theme-original, returning paths and a scanned file count. Requires DRUPAL_ROOT.

Instructions

Which core/module templates a theme overrides, and which it invented.

For every Twig file in the theme, the docroot is indexed once for files with the same name outside that theme; a match means the theme's copy wins at render time (an override), no match means a theme-original template. Returns both lists with paths, plus how many Twig files were scanned. Requires DRUPAL_ROOT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
theme_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose genuinely useful mechanism (the docroot is indexed for same-named files outside the theme; a match means the theme copy wins at render time) and the DRUPAL_ROOT prerequisite. It omits permission/auth requirements, potential cost of indexing the docroot, and caching/refresh behavior, so it is partial rather than complete.

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 outcome, then a single mechanism sentence, then the requirement. Every sentence carries information and there is no filler. The mechanism sentence is slightly dense but earns its place because it defines what 'override' means here.

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?

An output schema exists, so the return shape need not be restated, and the description correctly focuses on purpose, meaning of 'override', and the DRUPAL_ROOT prerequisite. The remaining gap is the undocumented single input parameter and the absence of any disambiguation from the similarly named sibling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

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

Schema description coverage is 0% and the sole parameter theme_name is never addressed in the description, so there is no explanation of expected format (machine name vs. label), case sensitivity, or what happens with an unknown theme. The description's repeated references to 'the theme' weakly imply the argument but add no real semantic value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb-like output ('which core/module templates a theme overrides, and which it invented') and the exact artifacts returned (both lists with paths, plus a scan count). That is a clear, specific purpose. It misses top-tier marks because it never distinguishes itself from the near-identical sibling 'theme_template_override' or from 'theme_templates'/'template_suggestions'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when/when-not guidance and no named alternatives, despite a sibling with a nearly identical name (theme_template_override) that an agent could easily confuse with this one. Usage is only implied by the description of what is returned.

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