Skip to main content
Glama

check_ai_health

Verify DEVONthink's AI services are operational and functioning correctly to ensure document summarization and classification features work as intended.

Instructions

Check if DEVONthink's AI services are available and working properly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The check_ai_health tool definition, including the name, description, schema, and the run handler that executes a JXA script to probe DEVONthink AI.
    export const checkAiHealthTool = defineTool({
      name: "check_ai_health",
      description:
        "Check if DEVONthink's AI services are available and working properly.",
      schema: z.object({}),
      run: async (_args, executor) => {
        const script = `
          ${JXA_APP}
    
          var available = false;
          var message = "";
          var model = null;
    
          try {
            // Attempt a lightweight AI probe: ask a trivial question with no documents.
            // DEVONthink will throw if the AI engine is unavailable or misconfigured.
            var testAnswer = app.getChatResponseForMessage("Reply with the single word: OK", { temperature: 0 });
            available = true;
            message = "DEVONthink AI is available and responding.";
          } catch (e) {
            available = false;
            message = e.message || String(e);
          }
    
          JSON.stringify({ available: available, message: message, model: model });
        `;
    
        const result = executor.run(script);
        return JSON.parse(result.stdout) as {
          available: boolean;
          message: string;
          model: string | null;
        };
      },
    });

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/mnott/Devon'

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