Skip to main content
Glama

set_row_rule

DestructiveIdempotent

Admin only. Decide which ROWS of a table a role may see or change. modes: all | own (rows where the person is in one of owner_columns, e.g. owner_id, created_by) | assigned (rows the person is linked to via set_record_members) | assigned_via (the person is linked to the PARENT record: field = the reference column, parent_resource = the parent table, e.g. lab orders via project_id to mod_asbest_projects) | field_equals (row field = a field of the person's profile) | none. Several rules for one role are OR-ed. A table with rules but none for a given role leaves that role unrestricted. applies_to: read | write | all. Pass rule_id + remove=true to delete a rule. Read 'scope' before relying on it.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_row_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoWhich rows the role may see or change
noteNoWhy — shows up in list_row_rules.
roleNo'*' = every role (except superadmin).
fieldNoFor field_equals: column of the table. For assigned_via: the reference column (e.g. project_id).
removeNotrue with rule_id deletes the rule
rule_idNoID of the rule
resourceNoTable the row rule applies to
applies_toNoread | create | update | delete, or write (= create+update+delete), or all.
owner_columnsNoFor mode own, e.g. ["owner_id","created_by"].
profile_fieldNoFor mode field_equals.
parent_resourceNoFor assigned_via: the parent table whose assignments count.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / mode / description
      Added value: +"Which rows the role may see or change"
    • addedInput schema / properties / remove / description
      Added value: +"true with rule_id deletes the rule"
    • addedInput schema / properties / resource / description
      Added value: +"Table the row rule applies to"
    • addedInput schema / properties / rule_id / description
      Added value: +"ID of the rule"
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (destructive/idempotent), it discloses the admin-only auth requirement, that several rules for one role are OR-ed, and critically that a table with rules but none for a role leaves that role unrestricted — a default-deny vs default-allow nuance an agent would otherwise get wrong. It also flags 'Read scope before relying on it', warning about propagation/staleness.

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?

Dense but front-loaded: admin restriction first, mode semantics next, deletion last. Every clause carries information, though the long parenthetical lab-orders example makes one sentence harder to parse than necessary.

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 an 11-parameter, destructive, no-output-schema tool, the description covers the auth gate, the delete path, the OR/precedence model and most mode parameters. The main gap is the undocumented 'in_region' mode value, which an agent could not infer from the prose.

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?

With 100% schema coverage the baseline is 3, and the description meaningfully adds semantics: owner_columns for 'own', field = the reference column for 'assigned_via' with parent_resource as the parent table, and profile_field for field_equals. It omits the 'in_region' enum value present in the schema and narrows applies_to to read|write|all, missing create/update/delete.

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 leads with a specific verb+resource: deciding which ROWS of a table a role may see or change. It names the sibling it depends on (set_record_members for 'assigned') and the conceptual boundary versus plain record membership, so an agent can tell what this tool governs without opening the schema.

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?

It gives per-mode usage guidance (when to pick own vs assigned vs assigned_via vs field_equals) and states the deletion path (rule_id + remove=true), which is non-obvious from the schema. It stops short of explicitly routing to preview_row_rules or list_row_rules for verification, and the interplay with set_record_members is only implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.