Skip to main content
Glama

update_record_content

Modify existing record content in DEVONthink by providing UUID and new text or source material for text, HTML, or Markdown documents.

Instructions

Updates the content of an existing record in DEVONthink. For text records, sets plain text. For HTML/Markdown records, sets the source. UUID is required. Returns updated: true with uuid and name on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYesUUID of the record to update
contentYesNew content to write to the record

Implementation Reference

  • The complete tool definition, including schema validation and the handler (run function) which uses JXA to update a DEVONthink record.
    export const updateRecordContentTool = defineTool({
      name: "update_record_content",
      description:
        "Updates the content of an existing record in DEVONthink. " +
        "For text records, sets plain text. For HTML/Markdown records, sets the source. " +
        "UUID is required. Returns updated: true with uuid and name on success.",
      schema: z.object({
        uuid: z.string().describe("UUID of the record to update"),
        content: z.string().describe("New content to write to the record"),
      }),
      run: async (args, executor) => {
        const { uuid, content } = args;
    
        const script = `
          ${JXA_APP}
          var uuid = ${jxaLiteral(uuid)};
          var content = ${jxaLiteral(content)};
    
          var record = app.getRecordWithUuid(uuid);
          if (!record || !record.uuid()) throw new Error("Record not found for UUID: " + uuid);
    
          var recordType = record.type();
          if (recordType === "html" || recordType === "markdown" || recordType === "feed") {
            record.source = content;
          } else {
            record.plainText = content;
          }
    
          JSON.stringify({ updated: true, uuid: record.uuid(), name: record.name() });
        `;
    
        const result = executor.run(script);
        return JSON.parse(result.stdout);
      },
    });
Behavior4/5

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

With no annotations provided, the description carries full behavioral disclosure burden. It successfully describes the return format ('updated: true with uuid and name') since no output schema exists, and clarifies how content is interpreted for different record types. It could be improved by explicitly stating that this operation overwrites existing content.

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 tightly constructed sentences with no waste: purpose statement, content-type behavior, required parameter reminder, and return value documentation. Every sentence earns its place, particularly the return value documentation which compensates for the missing output schema.

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?

For a 2-parameter mutation tool with no annotations and no output schema, the description is remarkably complete. It covers the operation purpose, parameter semantics for content types, and return structure. Minor gap: does not explicitly warn about destructive overwrite behavior or prerequisites like record existence.

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?

While the input schema has 100% description coverage (baseline 3), the description adds valuable semantic context about the content parameter—specifically that it sets 'plain text' for text records and 'source' for HTML/Markdown records. This type-specific behavior is not inferable from the schema alone.

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 clearly states the specific action (updates content), target resource (existing record in DEVONthink), and distinguishes from siblings like create_record (creates vs updates) and set_record_properties (content vs properties). It further clarifies handling for different record types (text vs HTML/Markdown).

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?

The description provides implicit usage guidance by clarifying content handling for different record types (plain text vs source), but lacks explicit when-to-use guidance versus close siblings like set_record_properties. It states 'UUID is required' but this is redundant with the schema's required field.

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