get_type_definition
Extract the complete definition of a Python type, including members and source code, from a specified file. Supports classes, TypeAlias, Enum, Protocol, TypedDict, and NamedTuple.
Instructions
Extract a class, TypeAlias, Enum, Protocol, TypedDict or NamedTuple definition with its members and source.
Args: path: Path to a .py file. name: Type name.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"name": "<name>"
},
"name": "get_type_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |