get_typescript_definition
Generate strict TypeScript interfaces and types from Pydantic models, FastAPI applications, or live OpenAPI URLs to keep frontend types in sync.
Instructions
Generate strict TypeScript interfaces and types from a Pydantic model, FastAPI app, or live OpenAPI URL.
Args: target: Target identifier (e.g. 'models.user:UserProfile', 'main:app', 'https://api.example.com/openapi.json'). project_dir: Optional path to the project root directory.
Returns: TypeScript interface/type definitions code as a string, or an error dictionary.
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": {
"target": "<target>"
},
"name": "get_typescript_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| project_dir | No |