Skip to main content
Glama
ms-methos

jsonfabrica-mcp-server

Create a JsonFabrica sequence

jsonfabrica_create_sequence

Creates a durable named sequence for generating numbers, strings, or UUIDs in templates. Fails if a sequence with the same name already exists.

Instructions

Calls POST /v1/sequences. Creates a durable named sequence (number/string/uuid), referenced from template bodies via createSeq()/getSeq()-style functions. Fails with a 409-style conflict error if a sequence with this name already exists for the tenant — use jsonfabrica_update_sequence to change an existing one's currentValue/step instead of retrying create with the same name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesUnique identifier for the sequence within the tenant, referenced from template bodies via createSeq("name")/getSeq("name") placeholders. Required; creation fails if a sequence with this name already exists.
stepNoAmount `currentValue` is incremented by on each bump, for "number"/"string" sequences (ignored for "uuid"). Optional; defaults to 1 when omitted. May be negative to count down.
typeYesValue kind the sequence produces on each bump: "number" increments `currentValue` by `step` and returns a numeric value; "string" behaves like "number" but the returned value is stringified; "uuid" does not use `start`/`step` to derive values (but `start` must still be provided — see its description); each bump returns a fresh UUID. Required.
startNoInitial value of `currentValue` for "number"/"string" sequences. Marked optional in this schema, but the gateway validates it as a required finite number for every sequence type — omitting it always causes a 400 validation error, even for type "uuid". For "uuid" sequences the value is stored but not used to derive the generated UUIDs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSequence name.
stepNoIncrement applied per bump (ignored for "uuid").
typeYesValue kind produced on each bump.
startNoInitial value the sequence was created with.
tenantIdYesOwning tenant id.
createdAtYesISO-8601 creation timestamp.
updatedAtYesISO-8601 last-update timestamp.
currentValueYesCurrent stored counter value (unused by "uuid" sequences).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / name / description
      Added value: +"Unique identifier for the sequence within the tenant, referenced from template bodies via createSeq(\"name\")/getSeq(\"name\") placeholders. Required; creation fails if a sequence with this name already exists."
    • addedInput schema / properties / start / description
      Added value: +"Initial value of `currentValue` for \"number\"/\"string\" sequences. Marked optional in this schema, but the gateway validates it as a required finite number for every sequence type — omitting it always causes a 400 validation error, even for type \"uuid\". For \"uuid\" sequences the value is stored but not used to derive the generated UUIDs."
    • addedInput schema / properties / step / description
      Added value: +"Amount `currentValue` is incremented by on each bump, for \"number\"/\"string\" sequences (ignored for \"uuid\"). Optional; defaults to 1 when omitted. May be negative to count down."
    • addedInput schema / properties / type / description
      Added value: +"Value kind the sequence produces on each bump: \"number\" increments `currentValue` by `step` and returns a numeric value; \"string\" behaves like \"number\" but the returned value is stringified; \"uuid\" does not use `start`/`step` to derive values (but `start` must still be provided — see its description); each bump returns a fresh UUID. Required."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "createdAt": {
      +      "description": "ISO-8601 creation timestamp.",
      +      "type": "string"
      +    },
      +    "currentValue": {
      +      "description": "Current stored counter value (unused by \"uuid\" sequences).",
      +      "type": "number"
      +    },
      +    "name": {
      +      "description": "Sequence name.",
      +      "type": "string"
      +    },
      +    "start": {
      +      "description": "Initial value the sequence was created with.",
      +      "type": "number"
      +    },
      +    "step": {
      +      "description": "Increment applied per bump (ignored for \"uuid\").",
      +      "type": "number"
      +    },
      +    "tenantId": {
      +      "description": "Owning tenant id.",
      +      "type": "string"
      +    },
      +    "type": {
      +      "description": "Value kind produced on each bump.",
      +      "enum": [
      +        "number",
      +        "string",
      +        "uuid"
      +      ],
      +      "type": "string"
      +    },
      +    "updatedAt": {
      +      "description": "ISO-8601 last-update timestamp.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tenantId",
      +    "name",
      +    "type",
      +    "currentValue",
      +    "createdAt",
      +    "updatedAt"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.4

TDQS

A4.6/5.0
Behavior4/5

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

The description discloses persistence, conflict failure, and the surprising gateway validation that start is required despite being marked optional in the schema. It does not contradict the annotations and reasonably conveys the non-idempotent, non-destructive nature of the operation.

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?

The top-level description is concise and focused, while the detailed schema descriptions are appropriately placed in the parameter definitions. There is no redundant or irrelevant text.

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?

The description includes important operational context such as template placeholder usage, conflict behavior, and the alternative update path. Since an output schema exists, the lack of an explicit return-value explanation is not a gap.

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 property descriptions fully cover every parameter, including type-specific behavior for number/string/uuid, step defaults, and the start edge case. This leaves no ambiguity about parameter meaning or validation requirements.

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 clearly states that it calls POST /v1/sequences to create a durable named sequence for number/string/uuid kinds. It also distinguishes itself from the update tool by explicitly advising use of jsonfabrica_update_sequence when a sequence already exists.

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 gives explicit guidance on when to use the tool and what happens on conflict, including the alternative update operation. It does not enumerate every possible use case, but the provided context is sufficient for correct tool selection.

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