Skip to main content
Glama

get_shape

Retrieve the complete shape (methods and properties) of a class, interface, or typed variable, showing all members including inherited ones via the extends chain.

Instructions

Get the shape (methods + properties) of a CLASS, INTERFACE, or typed variable.

Shows all members including inherited ones via EXTENDS chain. For variables, follows INSTANCE_OF to find the type, then returns its shape.

Use this to understand:

  • "What methods does GraphBackend have?" → get_shape(target="GraphBackend")

  • "What can I call on this variable?" → get_shape(target="db", file="handlers.ts")

  • "What does this interface require?" → get_shape(target="NodeRecord")

Returns: members (methods + properties), extends chain, implements list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesCLASS, INTERFACE, or variable name (or semantic ID)
fileNoFile path to disambiguate (optional)
Behavior4/5

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

With no annotations, the description carries full burden and discloses key behaviors: shows inherited members via EXTENDS chain, follows INSTANCE_OF for variables, and returns members, extends chain, implements list. Minor gaps like depth limits or performance are not mentioned.

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 purpose, and uses bullet-point examples that earn their place. No wasted words.

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 and absence of output schema, the description covers essential information: members, inheritance, and return values. It lacks explicit differentiation from siblings but is still very good.

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 100%, so baseline is 3. The description adds meaning by explaining target can be CLASS, INTERFACE, variable name, or semantic ID, and file disambiguates. Examples clarify usage beyond basic schema.

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 it gets the shape (methods + properties) of a CLASS, INTERFACE, or typed variable, including inherited members. Examples differentiate it from sibling tools like get_function_details or get_node.

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 explicit use cases with examples (e.g., 'What methods does GraphBackend have?') and explains behavior like following INSTANCE_OF. However, it doesn't explicitly state when not to use this tool or mention alternatives.

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/Disentinel/grafema'

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