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);
      },
    });
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 of behavioral disclosure. It successfully documents the return format ('Returns renamed: true with uuid...'), but omits safety information such as whether the operation is reversible, permission requirements, or error handling when UUIDs are invalid.

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?

The description consists of four efficient sentences that front-load the purpose, followed by input requirements and output specification. Each sentence contributes value without redundancy or extraneous information.

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 the simple arity (3 parameters, 2 required) and lack of output schema, the description adequately covers the tool's contract by specifying inputs and return values. However, it could be improved by noting error conditions or side effects of the rename operation.

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

Parameters3/5

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

The input schema has 100% description coverage for all three parameters (uuid, newName, databaseName). The description reinforces the required fields but does not add significant semantic meaning beyond what the schema already provides, meeting the baseline expectation for high-coverage schemas.

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 'Renames a specific record in DEVONthink,' providing a specific verb (renames) and resource (record). It clearly distinguishes from sibling operations like create_record, delete_record, or move_record through its specific focus on renaming.

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 states that 'UUID is required' and explains the parameter mapping, it does not explicitly contrast this tool with alternatives like set_record_properties (which might also modify record names) or specify when databaseName is necessary versus optional. The usage is implied by the parameter descriptions but lacks explicit guidance.

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