Skip to main content
Glama

rename_record

Rename records in DEVONthink by providing the UUID and new name. Returns confirmation with the UUID, old name, and new name for verification.

Instructions

Renames a specific record in DEVONthink. UUID is required. Provide the new name as newName. Returns renamed: true with uuid, oldName, and newName for confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesUUID of the record to rename
newNameYesNew name for the record
databaseNameNoDatabase name (optional, for disambiguation)

Implementation Reference

  • The rename_record tool definition, including its schema and JXA script handler.
    export const renameRecordTool = defineTool({
      name: "rename_record",
      description:
        "Renames a specific record in DEVONthink. " +
        "UUID is required. Provide the new name as newName. " +
        "Returns renamed: true with uuid, oldName, and newName for confirmation.",
      schema: z.object({
        uuid: z.string().describe("UUID of the record to rename"),
        newName: z.string().describe("New name for the record"),
        databaseName: z.string().optional().describe("Database name (optional, for disambiguation)"),
      }),
      run: async (args, executor) => {
        const { uuid, newName } = args;
    
        const script = `
          ${JXA_APP}
          var uuid = ${jxaLiteral(uuid)};
          var newName = ${jxaLiteral(newName)};
    
          var record = app.getRecordWithUuid(uuid);
          if (!record || !record.uuid()) throw new Error("Record not found for UUID: " + uuid);
    
          var oldName = record.name();
          record.name = newName;
    
          JSON.stringify({ renamed: true, uuid: record.uuid(), oldName: oldName, newName: record.name() });
        `;
    
        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