get_config
Retrieve current configuration details for the Draw Things app, including active model and settings, to manage image generation workflows.
Instructions
Get the current Draw Things configuration including the loaded model and settings
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:47-55 (registration)Registers the "get_config" MCP tool with the server, providing description, schema, and a handler that calls getConfig(client) and wraps the result.server.tool( "get_config", getConfigDescription, getConfigSchema.shape, async () => { const result = await getConfig(client); return { content: result }; } );
- src/tools/get-config.ts:4-8 (schema)Defines the Zod input schema (empty object since no params) and description for the get_config tool.export const getConfigSchema = z.object({}); export const getConfigDescription = "Get the current Draw Things configuration including the loaded model and settings";
- src/tools/get-config.ts:9-30 (handler)Core handler logic: fetches configuration from DrawThingsClient, stringifies to JSON text response or error message.export async function getConfig( client: DrawThingsClient ): Promise<{ type: "text"; text: string }[]> { try { const config = await client.getConfig(); return [ { type: "text", text: JSON.stringify(config, null, 2), }, ]; } catch (error) { const message = error instanceof Error ? error.message : String(error); return [ { type: "text", text: `Error getting config: ${message}. Make sure Draw Things is running with the API Server enabled.`, }, ]; } }