Skip to main content
Glama

move_record

Relocate records between groups in DEVONthink databases using UUIDs or identifiers to reorganize content and maintain document organization.

Instructions

Move a record to a different group in DEVONthink. Resolve the source record by uuid (preferred), recordId + databaseName, recordName + databaseName, or recordPath + databaseName. Provide destinationGroupUuid to specify where to move the record. Returns the updated record properties after the move.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidNoUUID of the record to move
recordIdNoNumeric record ID (requires databaseName)
recordNameNoRecord name (requires databaseName, use uuid when possible)
recordPathNoRecord path within the database (requires databaseName)
destinationGroupUuidNoUUID of the destination group
databaseNameNoDatabase name (required for recordId, recordName, recordPath)

Implementation Reference

  • The implementation of the `move_record` tool, defining the input schema and the JXA script executed to move a record in DEVONthink.
    export const moveRecordTool = defineTool({
      name: "move_record",
      description:
        "Move a record to a different group in DEVONthink. " +
        "Resolve the source record by uuid (preferred), recordId + databaseName, " +
        "recordName + databaseName, or recordPath + databaseName. " +
        "Provide destinationGroupUuid to specify where to move the record. " +
        "Returns the updated record properties after the move.",
      schema: z.object({
        uuid: z.string().optional().describe("UUID of the record to move"),
        recordId: z.number().int().nonnegative().optional().describe("Numeric record ID (requires databaseName)"),
        recordName: z.string().optional().describe("Record name (requires databaseName, use uuid when possible)"),
        recordPath: z.string().optional().describe("Record path within the database (requires databaseName)"),
        destinationGroupUuid: z.string().optional().describe("UUID of the destination group"),
        databaseName: z.string().optional().describe("Database name (required for recordId, recordName, recordPath)"),
      }),
      run: async (args, executor) => {
        const { uuid, recordId, recordName, recordPath, destinationGroupUuid, databaseName } = args;
    
        const script = `
          ${JXA_APP}
          var uuid = ${jxaLiteral(uuid ?? null)};
          var recordId = ${jxaLiteral(recordId ?? null)};
          var recordName = ${jxaLiteral(recordName ?? null)};
          var recordPath = ${jxaLiteral(recordPath ?? null)};
          var dbName = ${jxaLiteral(databaseName ?? null)};
          var destinationGroupUuid = ${jxaLiteral(destinationGroupUuid ?? null)};
    
          ${JXA_RESOLVE_DB}
          ${JXA_RESOLVE_RECORD}
    
          var destGroup = null;
          if (destinationGroupUuid) {
            destGroup = app.getRecordWithUuid(destinationGroupUuid);
            if (!destGroup || !destGroup.uuid()) throw new Error("Destination group not found for UUID: " + destinationGroupUuid);
          } else {
            destGroup = db.root();
          }
    
          app.move({record: record, to: destGroup});
          var moved = app.getRecordWithUuid(record.uuid());
          if (!moved || !moved.uuid()) throw new Error("Move operation failed");
    
          var record = moved;
          JSON.stringify(${JXA_RECORD_PROPS});
        `;
    
        const result = executor.run(script);
        return JSON.parse(result.stdout);
      },
    });
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It successfully discloses the return value ('updated record properties'), but omits other behavioral details like error conditions, cross-database limitations, or explicit confirmation that the record is removed from the source location.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four well-structured sentences with zero waste: purpose first, resolution logic second, destination specification third, and return value fourth. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, no annotations, and no output schema, the description adequately covers the resolution logic, destination requirements, and return format. Minor gaps remain regarding error handling and side effect specifics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 100% schema coverage, the description adds valuable semantic context by establishing a preference hierarchy (uuid is 'preferred') and consolidating the parameter relationships into a coherent resolution strategy that aids agent reasoning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear, specific action ('Move a record') and context ('to a different group in DEVONthink'), distinguishing it from sibling tools like duplicate_record, replicate_record, or create_record.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description excellently explains how to resolve source records (uuid preferred vs. other methods), it lacks explicit guidance on when to choose this over similar operations like replicate_record or duplicate_record, or prerequisites for the move operation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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