Skip to main content
Glama

Nibomo SQL execute (write)

sql_execute
Destructive

Creates, updates or deletes cards and decks with Nibomo SQL INSERT, UPDATE or DELETE, not full PostgreSQL; cannot write review_events or FSRS state. New cards: front_text is a recall prompt, never the answer; at least one tag. One call is an atomic batch of up to 50 semicolon-separated writes, 100 affected rows each. Arrays: ('a', 'b'), or () to clear; filter UPDATE and DELETE by tag with tags OVERLAP ('tag'); RETURNING col1, col2 returns affected rows. After saving cards, tell how many and where they are (one card: its link, get_guide(card_authoring); many: data.reviewUrl, the Review page), and offer to study them now. ok true with data.rowsOmitted or top-level truncated true: the write landed; never resend it, SELECT to check.

Input Schema

NameRequiredDescriptionDefault
sqlYesOne or more semicolon-separated write statements.
workspaceIdNoWorkspace UUID from list_workspaces; omit for the selected default.

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / sql / description
      Previous value: -"One or more write statements in the published Nibomo SQL dialect (INSERT, UPDATE, DELETE)."New value: +"One or more semicolon-separated write statements."
    • changedOutput schema / properties / data / anyOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "affectedCount": {
      -        "type": "number"
      -      },
      -      "normalizedSql": {
      -        "type": "string"
      -      },
      -      "resource": {
      -        "enum": [
      -          "cards",
      -          "decks"
      -        ],
      -        "type": "string"
      -      },
      -      "rows": {
      -        "items": {
      -          "additionalProperties": {
      -            "$ref": "#/definitions/__schema0"
      -          },
      -          "propertyNames": {
      -            "type": "string"
      -          },
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "rowsOmitted": {
      -        "type": "boolean"
      -      },
      -      "sql": {
      -        "type": "string"
      -      },
      -      "sqlOmitted": {
      -        "type": "boolean"
      -      },
      -      "statementType": {
      -        "enum": [
      -          "insert",
      -          "update",
      -          "delete"
      -        ],
      -        "type": "string"
      -      },
      -      "workspaceId": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "sql",
      -      "normalizedSql",
      -      "workspaceId",
      -      "statementType",
      -      "resource",
      -      "rows",
      -      "affectedCount",
      -      "rowsOmitted",
      -      "sqlOmitted"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "affectedCountTotal": {
      -        "type": "number"
      -      },
      -      "normalizedSql": {
      -        "type": "string"
      -      },
      -      "resource": {
      -        "type": "null"
      -      },
      -      "rowsOmitted": {
      -        "type": "boolean"
      -      },
      -      "sql": {
      -        "type": "string"
      -      },
      -      "sqlOmitted": {
      -        "type": "boolean"
      -      },
      -      "statementCount": {
      -        "type": "number"
      -      },
      -      "statementType": {
      -        "const": "batch",
      -        "type": "string"
      -      },
      -      "statements": {
      -        "items": {
      -          "additionalProperties": {},
      -          "properties": {
      -            "affectedCount": {
      -              "type": "number"
      -            },
      -            "resource": {
      -              "enum": [
      -                "cards",
      -                "decks"
      -              ],
      -              "type": "string"
      -            },
      -            "rows": {
      -              "items": {
      -                "additionalProperties": {
      -                  "$ref": "#/definitions/__schema0"
      -                },
      -                "propertyNames": {
      -                  "type": "string"
      -                },
      -                "type": "object"
      -              },
      -              "type": "array"
      -            },
      -            "statementType": {
      -              "enum": [
      -                "insert",
      -                "update",
      -                "delete"
      -              ],
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "statementType",
      -            "resource",
      -            "rows",
      -            "affectedCount"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "workspaceId": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "sql",
      -      "normalizedSql",
      -      "workspaceId",
      -      "rowsOmitted",
      -      "sqlOmitted",
      -      "statementType",
      -      "resource",
      -      "statementCount",
      -      "statements",
      -      "affectedCountTotal"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "affectedCount": {
      +        "type": "number"
      +      },
      +      "normalizedSql": {
      +        "type": "string"
      +      },
      +      "resource": {
      +        "enum": [
      +          "cards",
      +          "decks"
      +        ],
      +        "type": "string"
      +      },
      +      "reviewUrl": {
      +        "type": "string"
      +      },
      +      "rows": {
      +        "items": {
      +          "additionalProperties": {
      +            "$ref": "#/definitions/__schema0"
      +          },
      +          "propertyNames": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "rowsOmitted": {
      +        "type": "boolean"
      +      },
      +      "sql": {
      +        "type": "string"
      +      },
      +      "sqlOmitted": {
      +        "type": "boolean"
      +      },
      +      "statementType": {
      +        "enum": [
      +          "insert",
      +          "update",
      +          "delete"
      +        ],
      +        "type": "string"
      +      },
      +      "workspaceId": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "sql",
      +      "normalizedSql",
      +      "workspaceId",
      +      "statementType",
      +      "resource",
      +      "rows",
      +      "affectedCount",
      +      "rowsOmitted",
      +      "sqlOmitted"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "affectedCountTotal": {
      +        "type": "number"
      +      },
      +      "normalizedSql": {
      +        "type": "string"
      +      },
      +      "resource": {
      +        "type": "null"
      +      },
      +      "reviewUrl": {
      +        "type": "string"
      +      },
      +      "rowsOmitted": {
      +        "type": "boolean"
      +      },
      +      "sql": {
      +        "type": "string"
      +      },
      +      "sqlOmitted": {
      +        "type": "boolean"
      +      },
      +      "statementCount": {
      +        "type": "number"
      +      },
      +      "statementType": {
      +        "const": "batch",
      +        "type": "string"
      +      },
      +      "statements": {
      +        "items": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "affectedCount": {
      +              "type": "number"
      +            },
      +            "resource": {
      +              "enum": [
      +                "cards",
      +                "decks"
      +              ],
      +              "type": "string"
      +            },
      +            "rows": {
      +              "items": {
      +                "additionalProperties": {
      +                  "$ref": "#/definitions/__schema0"
      +                },
      +                "propertyNames": {
      +                  "type": "string"
      +                },
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "statementType": {
      +              "enum": [
      +                "insert",
      +                "update",
      +                "delete"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "statementType",
      +            "resource",
      +            "rows",
      +            "affectedCount"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "workspaceId": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "sql",
      +      "normalizedSql",
      +      "workspaceId",
      +      "rowsOmitted",
      +      "sqlOmitted",
      +      "statementType",
      +      "resource",
      +      "statementCount",
      +      "statements",
      +      "affectedCountTotal"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag destructive/not-read-only; the description adds real operational context: atomic batch limits, unsupported tables, and crucially the recovery semantics ('ok true with data.rowsOmitted or truncated true: the write landed; never resend it'). That prevented-duplicate-write guidance is exactly the kind of non-schema disclosure this dimension rewards.

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: capability and limits lead, syntax rules follow, post-call behavior last. Every sentence carries information, though the array/RETURNING syntax block is packed tightly enough to read as a reference dump.

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 destructive write tool with an output schema, the description covers what can be written, batch limits, the partial-result flag, and the required follow-up message to the user. An agent has everything needed to call it correctly and to avoid a duplicate resend.

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?

Schema coverage is 100% and only two params, but the description adds syntax meaning the schema lacks: array literals ('a','b') versus () to clear, tags OVERLAP filtering, and RETURNING columns. It doesn't elaborate on workspaceId, which the schema already covers well.

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 first sentence gives a specific verb set (INSERT/UPDATE/DELETE) against specific resources (cards and decks) and immediately bounds the dialect ('not full PostgreSQL') and excludes review_events and FSRS state. This is enough to distinguish it from the sibling sql_query (reads) without opening either 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 states scope limits, the batching rule (max 50 statements, 100 rows each), how to filter UPDATE/DELETE by tag, and even the post-save reporting workflow. It never explicitly names sql_query as the alternative for reads, though 'SELECT to check' implies the split; that keeps it short of a 5.

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.