Skip to main content
Glama

get_open_databases

Lists currently open databases in DEVONthink to help users track and manage active database sessions for document organization and access.

Instructions

Get a list of all currently open databases in DEVONthink.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_open_databases tool handler definition and implementation using JXA to interact with DEVONthink.
    export const getOpenDatabasesTool = defineTool({
      name: "get_open_databases",
      description: "Get a list of all currently open databases in DEVONthink.",
      schema: z.object({}),
      run: async (_args, executor) => {
        const script = `
    ${JXA_APP}
    var dbs = app.databases();
    var result = [];
    for (var i = 0; i < dbs.length; i++) {
      var db = dbs[i];
      result.push({
        uuid: db.uuid(),
        name: db.name(),
        path: db.path()
      });
    }
    JSON.stringify(result);
    `.trim();
    
        const { stdout } = executor.run(script);
        return JSON.parse(stdout) as Array<{
          uuid: string;
          name: string;
          path: string;
        }>;
      },
    });

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