Skip to main content
Glama

aql_write

Write a 2D region of values into an Azquo database using the same AQL grammar as query_aql.

Mirrors the read shape — rowHeadings × columnHeadings × context — and adds a 2D values array. The cell at values[r][c] is anchored to the union of rowHeadings[r] + columnHeadings[c] + context, exactly as a read at the same coordinates would resolve.

Two modes, distinguished by options.createNames:

Case 1 — TRANSACTIONAL find-or-create. Caller supplies options.rowSet + options.rowLanguage (and/or columnSet + columnLanguage) + createNames: true. Unresolved row/column headings are FIND-OR-CREATED under the target set with the language attribute set. Arrow form: rowSet = "A->B" puts new names into B as a child of A (chain is auto-created if missing). Use for: importing new transactions, customers, or any entity whose ID column is the row heading.

Case 2 — MULTI-FACETED all-or-nothing (default; createNames: false). Every heading must resolve to an existing name. Any miss is fatal — no values land. Use for: writing into a pre-structured region where the names are already known.

Structure-only mode: omit values (or pass []). The call resolves the headings, find-or-creates names if createNames=true, but writes no values. Equivalent to declaring hierarchy.

For date columns where the duplicate-name trap applies, use options.rowLanguage = "date" (bare attribute name, no "language" prefix). rowLanguage / columnLanguage always take the literal attribute name verbatim.

createNames and ignoreHeadingErrors are mutually exclusive — supply at most one.

═══ PROVENANCE — required on every write ═══ source: origin reference (file/URL/document). Lands on Provenance.name in the audit trail. agent: your AI agent name (e.g. "Claude"). Lands on Provenance.method.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentYesAI agent name (e.g. "Claude"). REQUIRED.
sourceYesOrigin reference — file, URL, document, or short note. REQUIRED.
valuesNo2D array of cell values (string | number | boolean | null). Omit or [] for structure-only mode.
contextYesContext expressions as a 2D array — use [[]] if no context needed
optionsNoEngine options — see query_aql for the full shape. Adds rowSet/columnSet/createNames for AQL-write.
databaseYesDatabase name to write into
rowHeadingsYesRow heading expressions as a 2D array of strings
columnHeadingsYesColumn heading expressions as a 2D array of strings

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: all-or-nothing vs find-or-create semantics, fatal-on-miss behavior, chain auto-creation for arrow form, no-values structure-only behavior, and mandatory provenance fields with where they land in the audit trail. It stops short of saying whether an existing cell value is overwritten by a write, and says nothing about permissions or rate limits.

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?

Long, but structured into labeled cases, a structure-only note, and a provenance block, with the core 'what it does' statement front-loaded. The '═══ PROVENANCE' banner is light ornamentation, and length is justified by the tool's two-mode complexity, though it could be trimmed slightly.

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 8-parameter, 6-required, nested-object mutation tool with no annotations and no output schema, the description covers mode selection, error semantics, and required provenance well. It does not describe what the call returns on success or the shape of a partial failure report, which nothing else supplies in the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: options.rowSet/columnSet arrow form ('A->B'), that rowLanguage/columnLanguage take the literal attribute name with no 'language' prefix, that options is a write extension of the query_aql shape, and that a missing/empty values array toggles structure-only mode. This is semantics well beyond the schema text.

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?

States a specific verb (write) and resource (a 2D region of values into an Azquo database) and ties itself to the read counterpart by naming the shared AQL grammar and the query_aql sibling. An agent can immediately distinguish it from query_aql and from the other write-ish siblings.

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?

Explicitly enumerates two modes selected by options.createNames, gives a 'Use for:' line for each, adds a third structure-only mode, and states the mutual-exclusion constraint with ignoreHeadingErrors. Conditions are concrete enough that an agent can pick the right mode without inference.

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