is_running
Check whether the DEVONthink application is currently active on your system to ensure proper integration before performing document operations.
Instructions
Check if the DEVONthink application is currently running.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The is_running tool implementation, including schema and handler logic.
export const isRunningTool = defineTool({ name: "is_running", description: "Check if the DEVONthink application is currently running.", schema: z.object({}), run: async (_args, executor) => { const script = ` var se = Application("System Events"); var v3 = se.processes.whose({ name: "DEVONthink 3" }).length > 0; var v4 = se.processes.whose({ name: "DEVONthink" }).length > 0; JSON.stringify({ running: v3 || v4 }); `.trim(); const { stdout } = executor.run(script); return JSON.parse(stdout) as { running: boolean }; }, });