Skip to main content
Glama

Ekwo OS — open source accounting: ledger, invoices and VAT on your own Supabase or Postgres

Change what a journal prints in its numbers

set_number_prefix
Idempotent

Sets the prefix one journal prints in place of {CODE} in the numbers it draws — FAC instead of SAL, for instance — or puts its code back with null. The journal keeps its code and its counter: the series goes on at the next number. A prefix another journal of the company already prints is refused. The pattern around it (year, width) is the company's number_format in update_company_profile. Needs settings.write.

Input Schema

NameRequiredDescriptionDefault
company_idYesThe company to work in. Ask list_companies if unsure.
journal_idNo
journal_codeNoThe journal by its code, e.g. SAL. get_company lists the journals.
number_prefixYesWhat {CODE} prints in the numbers this journal draws, e.g. FAC. Null prints the journal's code again. The code itself never changes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / company_id / description
      Added value: +"The company to work in. Ask list_companies if unsure."
    • addedInput schema / properties / company_id / format
      Added value: +"uuid"
    • addedInput schema / properties / company_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • addedInput schema / properties / journal_code / description
      Added value: +"The journal by its code, e.g. SAL. get_company lists the journals."
    • addedInput schema / properties / journal_code / minLength
      Added value: +1
    • addedInput schema / properties / journal_id / format
      Added value: +"uuid"
    • addedInput schema / properties / journal_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • changedInput schema / properties / number_prefix / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 20,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / number_prefix / description
      Added value: +"What {CODE} prints in the numbers this journal draws, e.g. FAC. Null prints the journal's code again. The code itself never changes."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say not-readOnly, idempotent, non-destructive; the description adds substantive context beyond that: the journal keeps its code and counter so the series continues at the next number, and duplicate prefixes across the company are rejected. It also names the required permission, which no structured field conveys.

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?

Four tight clauses, front-loaded with the effect and followed by consequences and the alternative owner. No filler; every sentence carries either behavior, constraint, or routing information.

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 a mutation with no output schema, it discloses side effects (counter/code preserved), the uniqueness constraint, and the auth requirement — enough to call it correctly. It stops short of saying how the journal is identified (id vs code) or what the response contains, which keeps it from a 5.

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

Parameters4/5

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

number_prefix is explained operationally (what replaces {CODE}, null restores the code, the underlying code never changes), reinforcing and slightly extending a schema that already documents it. The remaining ambiguity — supplying journal_id versus journal_code, where journal_id has no description — is not addressed, which is the main gap at 75% coverage.

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 precise verb and resource ('sets the prefix one journal prints in place of {CODE} in the numbers it draws') with a concrete FAC/SAL example, so the effect is unambiguous. It also separates itself from the adjacent concern (the year/width pattern) by pointing that to number_format in update_company_profile.

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?

Gives the action (set or reset with null), the routing to the sibling that owns the surrounding pattern, the prerequisite ('Needs settings.write'), and an explicit refusal condition ('A prefix another journal of the company already prints is refused'). An agent knows both when to call it and when the call will fail.

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.