Skip to main content
Glama

create_record

Add new records to DEVONthink databases by specifying name and type, with options for content, URLs, parent groups, and target databases.

Instructions

Create a new record in DEVONthink. Specify name and type (e.g. 'markdown', 'txt', 'rtf', 'html', 'bookmark', 'group'). Optionally provide content, url, a parent group UUID, and database name. Returns the full properties of the newly created record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the new record
typeYesRecord type: 'markdown', 'txt', 'rtf', 'html', 'bookmark', 'group', etc.
contentNoInitial text content for the record
urlNoURL for bookmark records or to associate with the record
parentGroupUuidNoUUID of the parent group (defaults to database root)
databaseNameNoTarget database name (defaults to current database)

Implementation Reference

  • The create_record tool handler, schema definition, and execution logic.
    export const createRecordTool = defineTool({
      name: "create_record",
      description:
        "Create a new record in DEVONthink. " +
        "Specify name and type (e.g. 'markdown', 'txt', 'rtf', 'html', 'bookmark', 'group'). " +
        "Optionally provide content, url, a parent group UUID, and database name. " +
        "Returns the full properties of the newly created record.",
      schema: z.object({
        name: z.string().describe("Name for the new record"),
        type: z.string().describe("Record type: 'markdown', 'txt', 'rtf', 'html', 'bookmark', 'group', etc."),
        content: z.string().optional().describe("Initial text content for the record"),
        url: z.string().optional().describe("URL for bookmark records or to associate with the record"),
        parentGroupUuid: z.string().optional().describe("UUID of the parent group (defaults to database root)"),
        databaseName: z.string().optional().describe("Target database name (defaults to current database)"),
      }),
      run: async (args, executor) => {
        const { name, type, content, url, parentGroupUuid, databaseName } = args;
    
        const script = `
          ${JXA_APP}
          var dbName = ${jxaLiteral(databaseName ?? null)};
          var parentGroupUuid = ${jxaLiteral(parentGroupUuid ?? null)};
    
          ${JXA_RESOLVE_DB}
    
          var props = {
            name: ${jxaLiteral(name)},
            type: ${jxaLiteral(type)}
          };
    
          var contentVal = ${jxaLiteral(content ?? null)};
          if (contentVal !== null) props.content = contentVal;
    
          var urlVal = ${jxaLiteral(url ?? null)};
          if (urlVal !== null) props.URL = urlVal;
    
          var location;
          if (parentGroupUuid) {
            var parentGroup = app.getRecordWithUuid(parentGroupUuid);
            if (!parentGroup || !parentGroup.uuid()) throw new Error("Parent group not found for UUID: " + parentGroupUuid);
            location = {in: parentGroup};
          } else {
            location = {in: db};
          }
    
          var record = app.createRecordWith(props, location);
          if (!record || !record.uuid()) throw new Error("Failed to create record");
    
          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 ('Returns the full properties') and distinguishes required vs optional parameters. However, it omits critical behavioral details for a mutation tool: error handling (e.g., duplicate names), reversibility, permissions required, or side effects.

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 efficiently structured sentences with no redundancy. Information is front-loaded with the action, followed by examples and optionality, ending with return value specification. Every sentence 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 the high schema coverage (100%) and six parameters, the description adequately compensates for missing output schema by documenting the return value. It could be improved by mentioning error cases (e.g., invalid type strings) or database existence requirements, but is otherwise complete for the complexity level.

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 (baseline 3), the description adds value by providing concrete examples for the 'type' parameter ('markdown', 'txt', 'rtf', etc.) and semantically grouping parameters as required ('Specify name and type') versus optional ('Optionally provide...').

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

Purpose4/5

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

The description clearly states the action ('Create') and resource ('new record') with specific scope ('in DEVONthink'). However, it does not explicitly differentiate from sibling tools like 'create_from_url' or 'create_summary_document', which could confuse selection when multiple creation options exist.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives such as 'create_from_url' or 'duplicate_record'. It lacks 'when-not-to-use' exclusions or prerequisites (e.g., permissions needed to create records).

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