Skip to main content
Glama

db_scope_set

Idempotent

Withdrawn: this call no longer changes access rules and always refuses with SCOPE_API_WITHDRAWN (HTTP 410). Access rules are set in db/schema.ts (scope: owner() / shared() / member() / serverOnly(), plus a client block for browser access) and take effect on deploy. An existing SQL-mode project that cannot adopt a schema file is told it needs a migration by Somewhere; nothing is changed either way. The in-band sw.db.scope(...) declaration from server code refuses the same way. db_scope_list still shows the recorded declarations beside the rules the live version serves.

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": {
      "project_id": "<project_id>",
      "table": "<table>"
    },
    "name": "db_scope_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
tableYesTable to scope.
intentNo"scoped" (default) arms per-user enforcement on owner_column; "shared" marks the table intentionally cross-user; "server_only" rejects direct app-user access while bare trusted server queries pass.
project_idYesProject ID (UUID), subdomain, or slug — resolved server-side, no UUID lookup needed. 'default' also works when the account has exactly one project; multi-project accounts must name one (the error lists them).
owner_columnNoThe column holding the owning user id (e.g. user_id, owner_id). Required only when intent is "scoped".
sensitive_columnsNoOptional list of column names to mark sensitive — the dashboard redacts them by default with click-to-reveal.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior1/5

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

The description is behaviorally rich—it names the exact error code, HTTP status, and confirms no access-rule changes occur. However, this contradicts the `readOnlyHint: false` annotation: a call that always refuses and changes nothing is effectively read-only, while the annotation marks it as not read-only. Per the rubric, that annotation contradiction forces a score of 1.

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 withdrawal status and refusal behavior are front-loaded in the first sentence, followed by useful replacement guidance. Despite being several sentences, each sentence adds relevant context for a deprecated tool and there is no filler.

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?

For a withdrawn tool with no output schema, the description is complete: it states the runtime outcome, the error code, what replaces it, and how listing still works. An agent has everything needed to avoid calling it and use the correct alternative.

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?

The input schema has 100% description coverage and documents all five parameters, including the `intent` enum and `owner_column` dependency. The description adds no parameter-level meaning beyond the schema, so the baseline score of 3 is appropriate.

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 that this tool is withdrawn and now always refuses with `SCOPE_API_WITHDRAWN` (HTTP 410), rather than changing access rules. It also distinguishes the replacement path (`db/schema.ts`) and the still-useful sibling (`db_scope_list`).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly tells the agent not to use this call for setting scopes and instead points to `db/schema.ts`, including the relevant scope declarations and deploy behavior. It also explains how `db_scope_list` remains useful for viewing recorded declarations, giving clear alternatives and when-not-to-use guidance.

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.

Resources