Skip to main content
Glama

Define collection schema

define_collection_schema
Idempotent

Define (or clear, with schema=null) a JSON Schema on a collection in a site's data store. A schema validates every appended record server-side, turning the collection into a typed backend. Defining a schema requires Pro. Scoped to a site you own.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYesA JSON Schema object to enforce, or null to make the collection schemaless
site_idYesThe site that owns the collection
collectionYesThe collection name
workspace_idNoOptional: the workspace to act in, from list_workspaces (the connection reaches the person's personal space and every workspace they are a member of). Required on a write when the connection reaches more than one workspace. Omit to act in the personal space (for an older single-workspace connection, the one workspace it was authorized for).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / workspace_id / description
      Previous value: -"Optional: the workspace (the personal space or a Pro workspace) to act in, from list_workspaces. Omit to act in the token owner's own account."New value: +"Optional: the workspace to act in, from list_workspaces (the connection reaches the person's personal space and every workspace they are a member of). Required on a write when the connection reaches more than one workspace. Omit to act in the personal space (for an older single-workspace connection, the one workspace it was authorized for)."
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, readOnlyHint=false. The description adds value by explaining the mutation semantics ('Define or clear'), the server-side validation effect, and the Pro requirement. It does not contradict annotations and provides behavioral details beyond them.

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 sentences with no redundancy. The core action and the null option are front-loaded, followed by the Pro requirement and scope. Every sentence carries information, and the structure is clear.

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?

Given the simple parameter set and no output schema, the description covers the essential behavior, scope, and prerequisite. It does not detail error handling or return values, but these are less critical here. The description is complete enough for an agent to call the tool correctly.

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 coverage is 100%, so parameters are fully documented. The description adds minor context by explaining that schema=null clears the schema (already in schema description) and that a schema validates records. It does not significantly enhance parameter understanding beyond the schema.

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 states a clear verb-resource pair ('Define (or clear) a JSON Schema on a collection') and scopes it to 'a site's data store'. It also clarifies the effect (server-side validation, typed backend) and distinguishes itself from sibling tools like delete_collection or set_collection_access by focusing on schema definition.

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?

The description gives actionable context: it mentions the Pro requirement and that it is scoped to a site you own. It implies when to use (when enforcing a schema on a collection) but does not explicitly name alternatives or when-not-to-use. The Pro caveat and ownership scope are helpful guardrails.

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.