Skip to main content
Glama

check_status

Verify the Draw Things API server is operational and ready to process image generation requests locally on Mac.

Instructions

Check if the Draw Things API server is running and accessible

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'check_status' tool. It invokes the client's checkStatus method and formats the result as a JSON text block.
    export async function checkStatus( client: DrawThingsClient ): Promise<{ type: "text"; text: string }[]> { const result = await client.checkStatus(); return [ { type: "text", text: JSON.stringify(result, null, 2), }, ]; }
  • Zod schema for the check_status tool input parameters (empty object, no params required).
    export const checkStatusSchema = z.object({});
  • src/index.ts:37-45 (registration)
    Registration of the 'check_status' tool on the MCP server, using the schema, description, and handler function.
    server.tool( "check_status", checkStatusDescription, checkStatusSchema.shape, async () => { const result = await checkStatus(client); return { content: result }; } );
  • Implementation of the DrawThingsClient.checkStatus() method, which checks server status via HTTP fetch to localhost:7860.
    async checkStatus(): Promise<{ running: boolean; message: string }> { try { const response = await fetch(this.baseUrl); if (response.ok) { return { running: true, message: `Draw Things API server is running at ${this.baseUrl}`, }; } return { running: false, message: `Draw Things API server returned status ${response.status}`, }; } catch (error) { return { running: false, message: `Cannot connect to Draw Things API at ${this.baseUrl}. Make sure Draw Things is running and the API Server is enabled in settings.`, }; } }

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/james-see/mcp-drawthings'

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