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
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | No | UUID of the record | |
| recordId | No | Numeric record ID (requires databaseName) | |
| recordPath | No | Record path within the database (requires databaseName) | |
| databaseName | No | Database 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); }, });