Skip to main content
Glama

list_group_content

Retrieve content from DEVONthink groups by specifying a UUID or database root to access documents and records for management and analysis.

Instructions

Lists the content of a specific group in DEVONthink. Supply a group UUID to list any group directly, or omit uuid to list the root of the current (or named) database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidNoUUID of the group to list. If omitted, the database root is listed
databaseNameNoName of the database to use when resolving the root group. If omitted, the current database is used. Ignored when uuid is provided

Implementation Reference

  • The main tool definition and handler for 'list_group_content', which fetches group contents from DEVONthink using JXA.
    export const listGroupContentTool = defineTool({
      name: "list_group_content",
      description:
        "Lists the content of a specific group in DEVONthink. " +
        "Supply a group UUID to list any group directly, or omit uuid to list " +
        "the root of the current (or named) database.",
      schema: z.object({
        uuid: z
          .string()
          .optional()
          .describe(
            "UUID of the group to list. If omitted, the database root is listed"
          ),
        databaseName: z
          .string()
          .optional()
          .describe(
            "Name of the database to use when resolving the root group. " +
            "If omitted, the current database is used. Ignored when uuid is provided"
          ),
      }),
      run: async (args, executor) => {
        const { uuid, databaseName } = args;
    
        const script = `
          ${JXA_APP}
          var uuid = ${jxaLiteral(uuid ?? null)};
          var dbName = ${jxaLiteral(databaseName ?? null)};
    
          var group;
          if (uuid) {
            // Fetch the group directly by UUID
            group = app.getRecordWithUuid(uuid);
            if (!group || !group.uuid()) {
              throw new Error("Group not found for UUID: " + uuid);
            }
          } else {
            // Fall back to the database root
            ${JXA_RESOLVE_DB}
            group = db.root();
            if (!group || !group.uuid()) {
              throw new Error("Could not retrieve database root");
            }
          }
    
          // List the direct children
          var children = group.children();
          var result = [];
          for (var i = 0; i < children.length; i++) {
            var record = children[i];
            result.push(${JXA_RECORD_SUMMARY});
          }
    
          JSON.stringify(result);
        `;
    
        const result = executor.run(script);
        return JSON.parse(result.stdout) as Array<{
          uuid: string;
          name: string;
          type: string;
          location: string;
          database: string;
          tags: string[];
          score: number;
          flagged: boolean;
          label: number;
          modificationDate: string | null;
        }>;
      },
    });
  • The Zod schema defining the input arguments (uuid and databaseName) for the tool.
    schema: z.object({
      uuid: z
        .string()
        .optional()
        .describe(
          "UUID of the group to list. If omitted, the database root is listed"
        ),
      databaseName: z
        .string()
        .optional()
        .describe(
          "Name of the database to use when resolving the root group. " +
          "If omitted, the current database is used. Ignored when uuid is provided"
        ),
    }),
  • The registration of 'listGroupContentTool' within the central tools index.
    listGroupContentTool,
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 explains the conditional logic between `uuid` and `databaseName` parameters, but fails to disclose what 'content' entails (record objects, names, UUIDs?) or the return structure, leaving the agent uncertain about the result format since no output schema exists.

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 is two sentences with zero waste. The first sentence establishes purpose immediately; the second efficiently covers both parameter interaction patterns. Every word earns its place.

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

Completeness3/5

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

Given the simple 2-parameter schema with full coverage, the description is minimally adequate. However, the absence of an output schema and annotations means the description should have described the return value or read-only nature to be complete; it falls short of this expectation.

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 schema has 100% description coverage, establishing a baseline of 3. The description paraphrases the schema's logic (omitting uuid lists root, databaseName ignored when uuid provided) without adding significant semantic enrichment like example UUID formats or clarifying that 'group' refers to DEVONthink's folder-like containers.

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 verb (Lists) and resource (content of a specific group in DEVONthink). It distinguishes from siblings like `get_record_content` (which retrieves binary content of a single record) through the use of 'Lists' implying enumeration of children/items, though it doesn't explicitly differentiate from `list_smart_groups`.

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 clear guidance on parameter usage patterns (supply UUID vs omit for root, use databaseName for named database), acting as implicit usage logic. However, it lacks explicit guidance on when to use this tool versus alternatives like `search` or `get_record_by_identifier` for finding items.

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