Skip to main content
Glama

get_record_properties

Retrieve comprehensive metadata and properties for DEVONthink records, including type, size, dates, tags, and location details using UUID, record ID, or path identifiers.

Instructions

Get detailed properties and metadata for a DEVONthink record. Returns uuid, name, type, path, location, database, size, dates, tags, comment, url, kind, mimeType, flagged, locking, wordCount, and more. Provide uuid (preferred), recordId + databaseName, or recordPath + databaseName.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidNoUUID of the record
recordIdNoNumeric record ID (requires databaseName)
recordPathNoRecord path within the database (requires databaseName)
databaseNameNoDatabase name (required for recordId or recordPath lookups)

Implementation Reference

  • The definition and handler implementation for the `get_record_properties` tool. It uses JXA to interact with DEVONthink to fetch record metadata.
    export const getRecordPropertiesTool = defineTool({
      name: "get_record_properties",
      description:
        "Get detailed properties and metadata for a DEVONthink record. " +
        "Returns uuid, name, type, path, location, database, size, dates, tags, " +
        "comment, url, kind, mimeType, flagged, locking, wordCount, and more. " +
        "Provide uuid (preferred), recordId + databaseName, or recordPath + databaseName.",
      schema: z.object({
        uuid: z.string().optional().describe("UUID of the record"),
        recordId: z.number().int().nonnegative().optional().describe("Numeric record ID (requires databaseName)"),
        recordPath: z.string().optional().describe("Record path within the database (requires databaseName)"),
        databaseName: z.string().optional().describe("Database name (required for recordId or recordPath lookups)"),
      }),
      run: async (args, executor) => {
        const { uuid, recordId, recordPath, databaseName } = args;
    
        const script = `
          ${JXA_APP}
          var uuid = ${jxaLiteral(uuid ?? null)};
          var recordId = ${jxaLiteral(recordId ?? null)};
          var recordPath = ${jxaLiteral(recordPath ?? null)};
          var recordName = null;
          var dbName = ${jxaLiteral(databaseName ?? null)};
    
          ${JXA_RESOLVE_DB}
          ${JXA_RESOLVE_RECORD}
    
          JSON.stringify(${JXA_RECORD_PROPS});
        `;
    
        const result = executor.run(script);
        return JSON.parse(result.stdout);
      },
    });

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