Skip to main content
Glama

Add Database Column

add_database_column

Add a typed column (title, rich-text, select, multi-select, number, checkbox, link, or date) to an existing AFFiNE database block to structure records and capture fields.

Instructions

Add a column to an existing AFFiNE database block. Supports title, rich-text, select, multi-select, number, checkbox, link, and date types. A title addition is rejected when the current database snapshot already has a title column.

Input Schema

NameRequiredDescriptionDefault
nameYesColumn display name
typeNoColumn typerich-text
docIdYesDocument ID containing the database
widthNoColumn width in pixels (default 200)
optionsNoPredefined options for select/multi-select columns
workspaceIdNoWorkspace ID (optional if default set)
databaseBlockIdYesBlock ID of the affine:database block
expectedRevisionNoOptional read_doc revision of this primary document. Reject stale content before writing. Covers document content, not workspace metadata; requires all writers to share one MCP server.

Output Schema

NameRequiredDescriptionDefault
okNo
codeNo
nameNo
typeNo
addedNo
errorNo
detailsNo
columnIdNo
causeCodeNo
retryableNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false). The description adds real value with the title-uniqueness rejection rule and the supported type list, but says nothing about where the new column is placed, whether options are ignored for non-select types, or that expectedRevision guards against stale writes — that last point lives only in the schema.

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?

Three short sentences, front-loaded with purpose, then capability, then the single failure condition. No filler and nothing repeated from the schema beyond a brief type roll-up.

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?

With a full-coverage schema, an output schema present, and annotations covering the safety profile, the description covers what is needed to call the tool. Minor gaps remain: no mention of column placement/ordering or whether `options` applies only to select types.

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%, including the enum for `type` and a detailed note on `expectedRevision`, so the schema does the heavy lifting. The description's type enumeration merely restates the enum; its only added semantic is the interaction between type='title' and an existing title column.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource pair ('Add a column to an existing AFFiNE database block'), which clearly separates it from row-oriented siblings like add_database_row or read_database_columns. It stops short of naming a sibling or explaining when reading columns first is advisable, so it is clear but not differentiating.

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?

Usage is implied by the mutation verb and the 'existing database block" precondition, and one constraint (title rejection) is stated. There is no explicit guidance on prerequisites (reading columns first, obtaining databaseBlockId) or on choosing this tool versus compose_database_from_intent for bulk setup.

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

Deploy Server

Other Tools