Skip to main content
Glama

get_usages

Find every usage of a class—imports, inheritance, instantiations, annotations, and aliased imports—to prepare for a rename.

Instructions

Every place a class name is used — imports, inheritance, instantiations, annotations, references — including usages through import aliases (from pkg.db.models import X as XDB). Run this BEFORE a rename to enumerate what must change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
class_nameYes
include_testsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
totalYes
usagesYes
aliasesYes
truncatedYes
class_nameYes
files_affectedYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool includes usages through import aliases and that it should be run before a rename, which implies it is a read-only operation. However, it does not mention pagination or the limit parameter's behavior, which is a minor gap.

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?

The description is concise, front-loaded with the core purpose, and every sentence adds value. It uses a clear example of import aliases and a practical instruction (run before rename) without unnecessary fluff.

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 (3 parameters, output schema present), the description covers the main use case and provides actionable guidance. It lacks details on limit and include_tests, but the output schema likely clarifies return values. The description is sufficient for an agent to select and invoke the tool correctly.

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 description coverage is 0%, so the description must compensate. It explains the class_name parameter implicitly by describing what usages are found, but it does not explain the limit or include_tests parameters. The description adds some context for class_name but leaves the other two parameters undocumented.

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 clearly states the tool's purpose: to find every place a class name is used, listing specific usage types (imports, inheritance, instantiations, annotations, references) and including import aliases. It distinguishes itself from siblings by focusing on usages rather than searching or listing classes.

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

Usage Guidelines5/5

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

The description explicitly instructs to run this tool BEFORE a rename to enumerate what must change, providing clear when-to-use guidance. It also implies when not to use it (e.g., for searching classes, which is handled by search_classes).

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/aucontraire/registree'

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