Skip to main content
Glama

set_record_properties

Modify DEVONthink record properties including comments, flags, locks, and exclusions from AI features. Update specific attributes while preserving others unchanged.

Instructions

Set properties on a DEVONthink record. Settable properties: comment, flag (flagged), locked (locking), excludeFromChat, excludeFromClassification, excludeFromSearch, excludeFromSeeAlso, excludeFromTagging, excludeFromWikiLinking. Resolve record by uuid (preferred), recordId + databaseName, or recordPath + databaseName. Only provided properties are updated; others remain unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidNoUUID of the record
recordIdNoNumeric record ID (requires databaseName)
recordPathNoRecord path within the database (requires databaseName)
databaseNameNoDatabase name
commentNoSet the record comment/annotation
flagNoSet the flagged (starred) state
lockedNoSet the locked (locking) state
excludeFromChatNoExclude record from AI chat
excludeFromClassificationNoExclude record from auto-classification
excludeFromSearchNoExclude record from search results
excludeFromSeeAlsoNoExclude record from See Also suggestions
excludeFromTaggingNoExclude record from auto-tagging
excludeFromWikiLinkingNoExclude record from wiki-style auto-linking

Implementation Reference

  • The implementation of the set_record_properties tool, which constructs and executes a JXA script to update DEVONthink record properties.
    export const setRecordPropertiesTool = defineTool({
      name: "set_record_properties",
      description:
        "Set properties on a DEVONthink record. " +
        "Settable properties: comment, flag (flagged), locked (locking), " +
        "excludeFromChat, excludeFromClassification, excludeFromSearch, " +
        "excludeFromSeeAlso, excludeFromTagging, excludeFromWikiLinking. " +
        "Resolve record by uuid (preferred), recordId + databaseName, or recordPath + databaseName. " +
        "Only provided properties are updated; others remain unchanged.",
      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"),
        comment: z.string().optional().describe("Set the record comment/annotation"),
        flag: z.boolean().optional().describe("Set the flagged (starred) state"),
        locked: z.boolean().optional().describe("Set the locked (locking) state"),
        excludeFromChat: z.boolean().optional().describe("Exclude record from AI chat"),
        excludeFromClassification: z.boolean().optional().describe("Exclude record from auto-classification"),
        excludeFromSearch: z.boolean().optional().describe("Exclude record from search results"),
        excludeFromSeeAlso: z.boolean().optional().describe("Exclude record from See Also suggestions"),
        excludeFromTagging: z.boolean().optional().describe("Exclude record from auto-tagging"),
        excludeFromWikiLinking: z.boolean().optional().describe("Exclude record from wiki-style auto-linking"),
      }),
      run: async (args, executor) => {
        const {
          uuid, recordId, recordPath, databaseName,
          comment, flag, locked,
          excludeFromChat, excludeFromClassification, excludeFromSearch,
          excludeFromSeeAlso, excludeFromTagging, excludeFromWikiLinking,
        } = 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}
    
          var comment = ${jxaLiteral(comment ?? null)};
          var flag = ${jxaLiteral(flag ?? null)};
          var locked = ${jxaLiteral(locked ?? null)};
          var excludeFromChat = ${jxaLiteral(excludeFromChat ?? null)};
          var excludeFromClassification = ${jxaLiteral(excludeFromClassification ?? null)};
          var excludeFromSearch = ${jxaLiteral(excludeFromSearch ?? null)};
          var excludeFromSeeAlso = ${jxaLiteral(excludeFromSeeAlso ?? null)};
          var excludeFromTagging = ${jxaLiteral(excludeFromTagging ?? null)};
          var excludeFromWikiLinking = ${jxaLiteral(excludeFromWikiLinking ?? null)};
    
          if (comment !== null) record.comment = comment;
          if (flag !== null) record.flag = flag;
          if (locked !== null) record.locking = locked;
          if (excludeFromChat !== null) record.excludeFromChat = excludeFromChat;
          if (excludeFromClassification !== null) record.excludeFromClassification = excludeFromClassification;
          if (excludeFromSearch !== null) record.excludeFromSearch = excludeFromSearch;
          if (excludeFromSeeAlso !== null) record.excludeFromSeeAlso = excludeFromSeeAlso;
          if (excludeFromTagging !== null) record.excludeFromTagging = excludeFromTagging;
          if (excludeFromWikiLinking !== null) record.excludeFromWikiLinking = excludeFromWikiLinking;
    
          JSON.stringify(${JXA_RECORD_PROPS});
        `;
    
        const result = executor.run(script);
        return JSON.parse(result.stdout);
      },
    });
  • Zod schema defining the input parameters for the set_record_properties tool.
    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"),
      comment: z.string().optional().describe("Set the record comment/annotation"),
      flag: z.boolean().optional().describe("Set the flagged (starred) state"),
      locked: z.boolean().optional().describe("Set the locked (locking) state"),
      excludeFromChat: z.boolean().optional().describe("Exclude record from AI chat"),
      excludeFromClassification: z.boolean().optional().describe("Exclude record from auto-classification"),
      excludeFromSearch: z.boolean().optional().describe("Exclude record from search results"),
      excludeFromSeeAlso: z.boolean().optional().describe("Exclude record from See Also suggestions"),
      excludeFromTagging: z.boolean().optional().describe("Exclude record from auto-tagging"),
      excludeFromWikiLinking: z.boolean().optional().describe("Exclude record from wiki-style auto-linking"),
    }),
Behavior3/5

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

With no annotations provided, the description carries full burden. It successfully discloses partial-update behavior (unchanged properties persist) and identification preferences (uuid preferred). However, it fails to explicitly flag this as a write/mutation operation requiring existing record resolution, or disclose error behavior if resolution fails.

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?

Three dense sentences with zero waste: first declares action and valid properties, second explains record resolution hierarchy, third clarifies partial update semantics. Information is front-loaded and structured logically.

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 complex 13-parameter tool with conditional resolution logic, the description adequately covers the property set, identification methods, and update behavior. However, given the lack of annotations and output schema, it should explicitly state this performs write operations on existing records to complete the safety profile.

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 description coverage, the description adds valuable semantic context: clarifying UUID is 'preferred' over other methods, grouping coupled parameters (recordId + databaseName), and mapping technical terms to UI concepts (flag/flagged, locked/locking). This goes beyond raw schema documentation.

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?

Description explicitly states 'Set properties on a DEVONthink record' with a comprehensive enumerated list of settable properties (comment, flag, locked, excludeFrom*). This clearly distinguishes it from sibling tools like get_record_properties (read) and update_record_content (content vs metadata).

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

Usage Guidelines4/5

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

Provides explicit resolution strategy ('Resolve record by uuid (preferred), recordId + databaseName, or recordPath + databaseName') and critical update semantics ('Only provided properties are updated'). However, lacks explicit 'when to use vs alternatives' guidance comparing it to create_record or get_record_properties.

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