Skip to main content
Glama

get_column_layout

Retrieve column layout settings for DEVONthink smart groups or rules by name or UUID, returning visible columns, table view columns, and column widths.

Instructions

Read the column layout for a DEVONthink smart group or smart rule from preferences. Returns the ordered visible columns, all table view columns, and column widths. Looks up by name (or UUID). Supports partial name matching. Input: { "name": "Archivieren - Jobs" } or { "name": "Jobs", "uuid": "4A469368-..." }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the smart group or smart rule whose column layout to read
uuidNoOptional UUID of the smart group (fallback if name not found). DEVONthink sometimes stores layouts under the UUID rather than the display name.

Implementation Reference

  • Handler function that implements the logic for get_column_layout, including exact and fuzzy matching, and fallback to UUID if provided.
    const getColumnLayout = async (args: Record<string, unknown>): Promise<unknown> => {
      const name = args.name as string | undefined;
      const uuid = args.uuid as string | undefined;
    
      if (!name || typeof name !== "string") {
        return { success: false, error: "name parameter is required" };
      }
    
      const exactResult = readLayoutForName(name);
      if (exactResult) {
        return { success: true, ...exactResult };
      }
    
      if (uuid && typeof uuid === "string") {
        const uuidResult = readLayoutForName(uuid);
        if (uuidResult) {
          return { success: true, ...uuidResult, name };
        }
      }
    
      const fuzzyMatches = findMatchingNames(name);
    
      if (fuzzyMatches.length === 1) {
        const fuzzyResult = readLayoutForName(fuzzyMatches[0]);
        if (fuzzyResult) {
          return {
            success: true,
            ...fuzzyResult,
            nameSearched: name,
            note: `Exact name not found; matched "${fuzzyMatches[0]}" via partial search`,
          };
        }
      }
    
      const examples = getExistingNames(15);
    
      if (fuzzyMatches.length > 1) {
        return {
          success: false,
          name,
          error: `No exact match for "${name}". Multiple partial matches found — be more specific.`,
          partialMatches: fuzzyMatches,
        };
      }
    
      return {
        success: false,
        name,
        error:
          `No column layout found for "${name}". ` +
          "This smart group may not have a custom layout yet (it will use defaults). " +
          "Use copy_column_layout to copy an existing layout to it.",
        exampleNames: examples,
      };
    };
  • Tool registration and input schema definition for get_column_layout.
    export const getColumnLayoutTool: McpTool = {
      name: "get_column_layout",
      description:
        "Read the column layout for a DEVONthink smart group or smart rule from preferences. " +
        "Returns the ordered visible columns, all table view columns, and column widths. " +
        "Looks up by name (or UUID). Supports partial name matching. " +
        'Input: { "name": "Archivieren - Jobs" } or { "name": "Jobs", "uuid": "4A469368-..." }',
      inputSchema: {
        type: "object" as const,
        properties: {
          name: {
            type: "string",
            description: "Name of the smart group or smart rule whose column layout to read",
          },
          uuid: {
            type: "string",
            description:
              "Optional UUID of the smart group (fallback if name not found). " +
              "DEVONthink sometimes stores layouts under the UUID rather than the display name.",
          },
        },
        required: ["name"],
        additionalProperties: false,
      },
      run: getColumnLayout,
    };
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses return values ('ordered visible columns, all table view columns, and column widths'), lookup behavior (partial matching), and data source (preferences). Missing error behavior (what happens if neither name nor UUID finds a match), but otherwise comprehensive for a read-only tool.

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?

Every sentence delivers distinct value: purpose statement, return value disclosure, lookup mechanism, matching behavior, and concrete examples. No redundancy or filler. Front-loaded with core action, followed by outputs, then input guidance.

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 read tool without output schema, the description adequately covers return structure and lookup behavior. The concrete examples demonstrate valid input patterns. Minor gap: does not specify return format (object/array) or error handling when lookups fail.

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?

Schema coverage is 100%, establishing baseline 3. Description adds valuable behavioral context: 'Supports partial name matching' for the name parameter and clarifies the UUID is a 'fallback'. The concrete JSON examples ('Input: { "name": ... }') add practical usage semantics beyond the schema definitions.

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 opens with specific verb 'Read', targets 'column layout' for 'DEVONthink smart group or smart rule', and specifies the source 'from preferences'. Clear scope distinguishes it from sibling tools like list_smart_groups (which lists the groups themselves) and copy_column_layout (which transfers layouts).

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 clear lookup guidance: 'Looks up by name (or UUID)' and explains the UUID parameter serves as a 'fallback if name not found'. Also notes 'Supports partial name matching'. Lacks explicit comparison to copy_column_layout for when to read vs. copy, but provides strong contextual usage patterns.

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