Skip to main content
Glama

Compose Database From Intent

compose_database_from_intent

Build an AFFiNE task board or issue tracker from declarative intent, with preset schema, kanban view, and optional starter rows.

Instructions

Create a useful AFFiNE database/data-view from declarative intent. Supports task_board and issue_tracker presets with starter schema, kanban view, and optional starter rows.

Input Schema

NameRequiredDescriptionDefault
docIdYesDocument ID containing the database
titleNoOptional database title. Defaults to the intent preset title.
intentYesDeclarative database intent to compose.
seedRowsNoOptional starter rows. If omitted, the preset starter rows are used.
placementNoOptional insertion target/position
workspaceIdNoWorkspace ID (optional if default set)
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
docIdNo
errorNo
lossyNo
statsNo
titleNo
viewsNo
intentNo
columnsNo
detailsNo
viewIdsNo
warningsNo
causeCodeNo
columnIdsNo
retryableNo
rowBlockIdsNo
workspaceIdNo
primaryViewIdNo
databaseBlockIdNo
recoveryGuidanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.10.2

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare it is a mutating (readOnlyHint=false), non-idempotent, non-destructive, open-world operation. The description adds what actually gets constructed (starter schema, kanban view, starter rows), which is real value, but it does not warn that repeated calls likely create duplicate databases or explain the stale-write guard implied by expectedRevision beyond the schema text.

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?

Two compact sentences, front-loaded with the action and immediately followed by the concrete presets and artifacts produced. No filler, though sentence two is essentially a feature list that could carry one clarifying clause about when to choose this tool.

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?

An output schema exists, so return values need not be described, and annotations cover the safety profile. However, for a creator tool with nested placement parameters and a revision-based concurrency guard, the description omits the duplicate-creation caveat and the write-ordering behavior an agent needs to invoke it safely.

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 all seven parameters including the placement object and expectedRevision are already documented inline. The description only echoes the enum presets and the default starter-row behavior, adding no syntax, precedence, or interaction detail beyond the schema.

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?

States a specific verb and resource: 'Create a ... AFFiNE database/data-view', and narrows it to declarative-intent composition with named presets. That is enough to distinguish it from row/column-level siblings like add_database_row or add_database_column, though it never names an alternative sibling explicitly.

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 only implied by 'from declarative intent' plus the two preset names. It does not say when to prefer this over create_doc, instantiate_template_native, or manual add_database_column/add_database_row workflows, nor any prerequisites such as creating/reading the doc first.

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