Skip to main content
Glama

link_widgets

Set up master-detail linking between two widgets on the same Grist page so selecting a source record filters the target widget to related records.

Instructions

Set up master-detail linking between two widgets on the same page. When a record is selected in the source widget, the target widget filters to show related records.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "page_name": "<page_name>",
      "source_widget": "<source_widget>",
      "target_widget": "<target_widget>"
    },
    "name": "link_widgets"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idNoDocument ID
page_nameYesPage containing both widgets
link_columnNoColumn name in the target table for reference-based linking (e.g. a Ref:SourceTable column). Omit for cursor-based same-table linking.
source_columnNoColumn name in the source table (for non-default linking). Usually not needed — defaults to using the selected row.
source_widgetYesTitle or table ID of the source (driving) widget
target_widgetYesTitle or table ID of the target (filtered) widget

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the core effect but omits important mutation details such as whether existing links are replaced, what permissions are required, whether the link persists across sessions, and what happens on failure.

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 tight sentences with the main action front-loaded. Every sentence contributes to understanding the tool's purpose and resulting behavior.

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?

The schema is richly documented and covers the parameters, but the description does not fully compensate for the lack of annotations on a mutation tool. It explains the concept adequately while leaving behavioral edge cases and operational prerequisites unstated.

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?

Schema description coverage is 100%, so the schema already defines all six parameters well. The description mentions source and target widgets conceptually but adds no syntax, constraints, or edge-case guidance beyond the schema.

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 states a specific verb and resource: 'Set up master-detail linking between two widgets on the same page.' It also explains the resulting behavior, which distinguishes this linking operation from the CRUD and page-management siblings.

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?

The description gives clear context for when the linking behavior applies: two widgets on the same page, with the target filtering when a source record is selected. It does not state exclusions or alternatives, but no close sibling alternative is evident from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.