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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the smart group or smart rule whose column layout to read | |
| uuid | No | Optional UUID of the smart group (fallback if name not found). DEVONthink sometimes stores layouts under the UUID rather than the display name. |
Implementation Reference
- src/tools/custom/column-layout.ts:97-151 (handler)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, }; }; - src/tools/custom/column-layout.ts:153-178 (registration)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, };