Skip to main content
Glama

View Template Info

view_template_info

Retrieve verified template names for overriding a Drupal Views display; validates view and display IDs against the site and lists available suggestions.

Instructions

Template names for overriding a Views display, verified against the site.

Looks the view up in the JSON:API view collection by its machine id (drupal_internal__id), so the display list is real: with display_id the chain starts at views-view--NAME--DISPLAY and falls back to the whole view; without it every display gets an entry, then the views-view base template. An unknown view errors with the views the site has, an unknown display_id with the displays that view has, and suggestions are marked in_checked_theme when the default theme's templates can be read (DRUPAL_ROOT). Views config changed names between Drupal generations (view.* on older sites, views.view.* on Drupal 11.4+), so the collection — addressed by entity id — is the stable source.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
view_nameYes
display_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses error behavior (unknown view returns the site's views, unknown display_id returns that view's displays), the fallback chain, and the in_checked_theme marking conditioned on being able to read the default theme's templates via DRUPAL_ROOT. It also explains why the JSON:API collection is the stable source across Drupal naming generations. Missing only explicit read-only/permission notes, but the disclosure is rich.

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?

The purpose statement is front-loaded and every block adds real information about lookup, fallback, and errors. The second paragraph is a single very long multi-clause sentence, which slightly hurts scanability, but there is little filler to cut.

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 return-value format is covered elsewhere, and the description fills in the behavioral gaps an agent needs: lookup semantics, fallback ordering, and both error cases. It stops short of documenting permissions or limits, but for a read-only lookup tool with a companion output schema this is close to complete.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it largely does: it identifies view_name as the machine id (drupal_internal__id) and explains how display_id changes the result set (chain starts at views-view--NAME--DISPLAY with fallback to the whole view, vs. an entry per display when omitted). It adds genuine semantics beyond the bare schema types, though it doesn't spell out exact string formats or error semantics per param in a structured way.

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 opening line names a specific resource ('Template names for overriding a Views display') and adds scoping via 'verified against the site,' so an agent knows it returns Views override template candidates rather than generic suggestions. It stops short of naming sibling tools like theme_template_overrides or template_suggestions, so it doesn't differentiate explicitly. A clear verb+resource would push this to a 5.

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?

The description implicitly teaches usage through the two invocation modes (with vs. without display_id and how the chain differs), which is meaningful. However, it never states when to prefer this over sibling tools that also surface template names, nor any prerequisite/context for choosing it. Usage is inferable rather than stated.

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