Skip to main content
Glama

rails_get_partial_interface

Read-onlyIdempotent

Analyze a Rails partial's interface to reveal expected local variables, where it is rendered, and methods called on each local—useful when rendering, passing locals, or refactoring dependencies.

Instructions

Analyze a partial's interface: local variables it expects, where it's rendered from, and what methods are called on each local. Use when: rendering a partial, understanding what locals to pass, or refactoring partial dependencies. Specify partial:"shared/status_badge" to see its full interface. Supports both underscore-prefixed and non-prefixed names.

Input Schema

NameRequiredDescriptionDefault
detailNoDetail level. summary: locals list + usage count. standard: locals + usage examples from codebase (default). full: locals + usage + full partial source.
partialYesPartial path relative to app/views (e.g. 'shared/status_badge', 'users/form'). The leading underscore is optional.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.39.1

TDQS

A4/5.0
Behavior4/5

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

Rich annotations already declare read-only, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds value by describing what the analysis actually reports (locals, render sites, method call sites), which matters because there is no output schema. Minor gap: no mention of limitations such as dynamically resolved partials.

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?

Three tight sentences: capability first, usage conditions second, format example third — all front-loaded with no filler. The 'Use when:' list is dense but each item earns its place.

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?

For a two-parameter read-only analysis tool with full schema coverage, the description supplies the missing return-value context (no output schema exists) and the usage triggers. Only the absence of any stated limitations keeps it from being fully complete.

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 100%: both 'partial' and 'detail' are documented, with the enum's three levels fully explained in the schema. The description's quoted example ('shared/status_badge') and the underscore-prefix note largely restate what the schema already says, so baseline 3 applies.

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?

Names a specific verb (analyze) and resource (partial's interface), then enumerates the three concrete outputs: expected locals, render sites, and methods called on each local. That differentiates it from a plain source read like rails_get_view, though it never names a sibling explicitly, and 'full' detail mode returning partial source blurs the boundary slightly.

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?

Gives an explicit 'Use when:' list covering rendering, passing locals, and refactoring dependencies — clear invocation context. It stops short of stating when to prefer a sibling tool (e.g., rails_get_view for raw source) or any exclusions.

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