Skip to main content
Glama

magento_find_class

Locates PHP classes, interfaces, abstracts, and traits in Magento by name. Searches repositories, models, blocks, helpers, controllers, and API interfaces.

Instructions

Find a PHP class, interface, abstract class, or trait by name in Magento. Locates repositories, models, resource models, blocks, helpers, controllers, API interfaces, and data objects. See also: magento_find_plugin (interceptors for this class), magento_find_preference (DI overrides), magento_find_method (methods in the class).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
classNameYesFull or partial PHP class name. Examples: "ProductRepository", "AbstractModel", "CartManagementInterface", "CustomerData", "StockItemRepository"
namespaceNoOptional PHP namespace filter to narrow results. Example: "Magento\Catalog\Model"
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral details. It does not disclose whether the operation is read-only, any access restrictions, rate limits, or side effects. The description lacks behavioral context beyond the basic function.

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 description is concise and front-loaded, stating the purpose immediately. It includes examples and sibling references efficiently. However, it could be structured with bullet points for improved readability.

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?

Given the tool's complexity (2 parameters, no output schema), the description covers key aspects: the types of classes found, example queries, and related tools. It does not explain return format or pagination, but this is acceptable for a search tool with high schema coverage.

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%, so the baseline is 3. The description adds example values for className and notes namespace as optional, but does not provide additional semantic meaning beyond what the schema already offers (e.g., no details on partial matching behavior or case sensitivity).

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?

The description explicitly states the tool finds PHP classes, interfaces, abstract classes, or traits by name, and lists concrete examples like repositories, models, and controllers. It also distinguishes from siblings by referencing magento_find_plugin, magento_find_preference, and magento_find_method.

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?

The description provides clear sibling references with brief explanations of their purposes, guiding when to use alternatives. However, it does not mention when not to use this tool or cover all sibling alternatives (e.g., magento_find_config, magento_find_block).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/krejcif/magector'

If you have feedback or need assistance with the MCP directory API, please join our Discord server