Skip to main content
Glama
informatics-isi-edu

Deriva MCP Server

Official

set_visible_columns

Control column visibility in table views by setting visible-columns annotations. Define which columns show in each UI context, with changes staged until applied.

Instructions

Set the visible-columns annotation on a table.

Controls which columns appear in different UI contexts and their order. Changes are staged locally until apply_annotations() is called.

Args: table_name: Name of the table. annotation: The visible-columns annotation value. Set to null/None to remove.

Visible-Columns Annotation Schema (tag:isrd.isi.edu,2016:visible-columns):

{
    "compact": [...],           // Columns for compact/list view
    "detailed": [...],          // Columns for detailed/record view
    "entry": [...],             // Columns for data entry (create/edit)
    "entry/create": [...],      // Columns for create only
    "entry/edit": [...],        // Columns for edit only
    "export": [...],            // Columns for export
    "filter": {                 // Faceted search configuration
        "and": [...]
    },
    "*": [...]                  // Default for all contexts
}

Column directive formats (items in column lists):

  1. Simple column name (string):

    "RID"
  2. Foreign key reference (array of [schema, constraint_name]):

    ["schema_name", "fkey_constraint_name"]
  3. Pseudo-column (object with source path):

    {
        "source": "column_name",           // Simple column
        "source": [                        // Or path through foreign keys
            {"outbound": ["schema", "fkey"]},
            "target_column"
        ],
        "sourcekey": "predefined_key",    // OR reference to source-definitions
        "entity": true,                   // Show as entity (row) vs scalar value
        "aggregate": "array",             // Aggregation: min, max, cnt, cnt_d, array, array_d
        "self_link": true,                // Link to current row
        "markdown_name": "Display Name",  // Custom column header
        "comment": "Tooltip text",        // Column tooltip
        "display": {                      // Display options
            "markdown_pattern": "{{{value}}}",
            "template_engine": "handlebars",  // or "mustache"
            "show_foreign_key_link": true,
            "array_ux_mode": "csv"           // raw, csv, olist, ulist
        }
    }

Filter context (for faceted search):

{
    "filter": {
        "and": [
            {
                "source": "column_name",
                "markdown_name": "Filter Label",
                "open": true,              // Expand by default
                "ux_mode": "choices",      // choices, ranges, check_presence
                "bar_plot": true,          // Show distribution chart
                "hide_null_choice": true,  // Hide "No value" option
                "choices": ["val1", "val2"], // Preset choices
                "ranges": [{"min": 0, "max": 100}]  // Preset ranges
            }
        ]
    }
}

Returns: JSON with status and the table name.

Examples: # Simple column list for compact view set_visible_columns("Image", { "compact": ["RID", "Filename", "Subject"], "detailed": ["RID", "Filename", "Subject", "Description", "URL"] })

# Include foreign key as a column
set_visible_columns("Image", {
    "compact": ["Filename", ["domain", "Image_Subject_fkey"]]
})

# Pseudo-column traversing foreign key
set_visible_columns("Image", {
    "detailed": [
        "Filename",
        {
            "source": [{"outbound": ["domain", "Image_Subject_fkey"]}, "Name"],
            "markdown_name": "Subject Name"
        }
    ]
})

# Configure faceted search
set_visible_columns("Image", {
    "filter": {
        "and": [
            {"source": "Species", "open": true},
            {"source": "Quality", "ux_mode": "choices"}
        ]
    }
})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
annotationNo
table_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description bears the full burden. It discloses critical behavior: 'Changes are staged locally until apply_annotations() is called.' It also states the return value: 'JSON with status and the table name.' The extensive schema documentation explains the shape of the annotation, but it does not mention whether the operation overwrites or merges existing annotations, nor does it address permissions or side effects beyond staging. Given the absence of annotations, this is a solid disclosure but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured, using headings, code blocks, and examples. It front-loads the core purpose and staging behavior, then dives into detailed schema documentation. While every section adds useful information for this complex tool, it is not a model of brevity; some repetition exists (e.g., example annotations). Overall, it is appropriately detailed for the complexity, just slightly over-stuffed.

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

Completeness5/5

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

Given the complexity of the visible-columns annotation and the absence of annotations, the description is exceptionally complete. It covers parameter meanings, annotation schema with all keys (compact, detailed, entry, export, filter, *), column directive formats, filter context details, examples, and return value. The output schema exists, so not explaining return values is fine. For a tool with two parameters and a deeply nested annotation, this is comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description fully compensates. It has an 'Args' section explaining both parameters: table_name is 'Name of the table', annotation is 'The visible-columns annotation value. Set to null/None to remove.' Additionally, it provides a complete JSON schema for the annotation value with examples for compact, detailed, foreign key references, pseudo-columns, and filter contexts. This far exceeds the minimal schema info and is essential for correct usage.

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?

The description clearly states the tool's function: 'Set the visible-columns annotation on a table.' It specifies the resource (table) and the exact action (setting the visible-columns annotation). The following sentence explains the purpose: controls which columns appear in UI contexts and their order. This distinguishes it from sibling tools like set_display_annotation or set_visible_foreign_keys, and the detailed schema clarifies the specific annotation type.

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 explains the tool's purpose and that changes are staged locally until apply_annotations() is called, which implies a usage context. However, it does not explicitly compare against incremental sibling tools like add_visible_column, remove_visible_column, or reorder_visible_columns, nor does it state when to choose this bulk-set tool over them. The usage is clear but not explicitly contrasted with alternatives.

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/informatics-isi-edu/deriva-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server