Skip to main content
Glama
Fakturia API MCP

Fakturia API MCP

by edjufy

create_discount_config

Create a reusable discount rule in Fakturia by defining percentage, applicable item types, and optional validity period for use in coupons or contracts.

Instructions

Create a new discount configuration in Fakturia. A discount configuration defines a reusable discount rule specifying the discount percentage, which item types it applies to (recurring, one-time, or specific items), and an optional validity period. Once created, the discount configuration can be referenced by coupon configurations or applied directly to contracts.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "discountPercent": "<discountPercent>"
    },
    "name": "create_discount_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesUnique name for the discount configuration. Used to reference this discount in coupon configurations and elsewhere.
itemsNoList of specific item numbers (SKUs) this discount applies to. Only relevant when useItems is true.
useItemsNoWhether to restrict this discount to only the items specified in the items list. If false, the discount applies based on the applyRecurrItems and applyOneTimeItems flags instead.
descriptionNoHuman-readable description of the discount configuration explaining its purpose or conditions.
projectNameNoName of the project to associate this discount configuration with.
validityUnitNoTime unit for the validity period (e.g. "month", "year", "day"). Used together with validityPeriod.
validityPeriodNoDuration for which the discount remains valid after being applied. Used together with validityUnit to define the full validity window (e.g. 3 months).
discountPercentYesThe discount percentage to apply (e.g. 10 for a 10% discount). Must be a positive number.
applyRecurrItemsNoWhether this discount applies to recurring (subscription) items on the contract.
applyOneTimeItemsNoWhether this discount applies to one-time items on the contract.
createInvoicePositionNoWhether to create a separate invoice line item (position) for the discount. If true, the discount appears as its own line on invoices rather than being applied inline.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A3.6/5.0
Behavior3/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 explain the domain behavior of the artifact being created (what the configuration defines and how it is later consumed). It is silent on mutation specifics an agent needs: whether the name must be unique and what happens on collision, permission requirements, idempotency, and whether creation has side effects or a resulting state.

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?

Three sentences with no filler, front-loaded with the action and followed by the entity definition and lifecycle. The middle sentence is long but every clause maps to a real parameter group, so little could be cut without losing meaning.

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?

For an 11-parameter creation tool with no annotations and no output schema, the description covers what is created but not what comes back or how failures manifest. An agent still lacks confirmation of the return value (e.g., a new config ID) and of name-uniqueness enforcement, which matters because names are used as references elsewhere.

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 every parameter already carries its own description and the baseline is 3. The description adds a useful synthesis of the three main parameter groupings (percentage, item scope, validity window) but does not explain interactions such as useItems overriding applyRecurrItems/applyOneTimeItems, nor mention projectName or createInvoicePosition.

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 and resource ('Create a new discount configuration') and then defines the entity: a reusable rule with a percentage, item-type scope, and optional validity period. The closing sentence positions it against siblings by noting it is referenced by coupon configurations or applied to contracts, so an agent can distinguish it from a direct contract-level discount.

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: 'reusable' plus 'can be referenced by coupon configurations or applied directly to contracts' hints that this is the template-creation path rather than applying a discount to a contract, but it never says when to choose this over create_contract_discount or create_coupon_config. No prerequisites or exclusions are given.

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