list_models
Discover available data models in a Gadget app using GraphQL introspection to understand the app's structure and available data types.
Instructions
List all models (types) available in this Gadget app via GraphQL introspection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:40-59 (handler)The handler implementation for the list_models tool, which performs a GraphQL introspection query to fetch available models.
case "list_models": { const data = await gql(` query { __schema { queryType { fields { name description type { name kind } } } } } `); const fields: any[] = data.__schema.queryType.fields; const models = fields .filter((f) => f.name && !f.name.startsWith("__") && f.type?.kind === "OBJECT") .map((f) => ({ name: f.name, description: f.description ?? "" })); return { content: [{ type: "text", text: JSON.stringify(models, null, 2) }] }; } - src/tools.ts:180-183 (registration)The tool registration and schema definition for list_models.
name: "list_models", description: "List all models (types) available in this Gadget app via GraphQL introspection.", inputSchema: { type: "object", properties: {} }, },