Skip to main content
Glama

Save a segment

firmafakta_save

Save a segment expression, with the per it counts (workplace or company), under a name in the account, to reuse later with firmafakta_load; it also shows on firmafakta.se under Sparade urval. Always makes a new saved segment, even when one has the same name: to change one use firmafakta_update. Refused when the account has no room for more. Returns the new id.

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>",
      "segment": "<segment>"
    },
    "name": "firmafakta_save"
  }
}

Input Schema

NameRequiredDescriptionDefault
perNowhat the segment counts, as you counted it: workplace or company; omitted saves workplace
nameYesa name for the segment, shown in load's list and on firmafakta.se
segmentYesthe segment expression in describe's segment language

Output Schema

NameRequiredDescriptionDefault
idNo
nameNo
usageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed28 schema fields changed
    • addedOutput schema / properties / id / title
      Added value: +"id"
    • removedOutput schema / properties / id / type
      Removed value: -"string"
    • addedOutput schema / properties / name / title
      Added value: +"name"
    • removedOutput schema / properties / name / type
      Removed value: -"string"
    • removedOutput schema / properties / usage / properties / credits_charged / maximum
      Removed value: -2147483647
    • removedOutput schema / properties / usage / properties / credits_charged / minimum
      Removed value: --2147483648
    • addedOutput schema / properties / usage / properties / credits_charged / title
      Added value: +"credits_charged"
    • removedOutput schema / properties / usage / properties / credits_charged / type
      Removed value: -"integer"
    • removedOutput schema / properties / usage / properties / credits_left / maximum
      Removed value: -2147483647
    • removedOutput schema / properties / usage / properties / credits_left / minimum
      Removed value: --2147483648
    • addedOutput schema / properties / usage / properties / credits_left / title
      Added value: +"credits_left"
    • removedOutput schema / properties / usage / properties / credits_left / type
      Removed value: -[
      -  "null",
      -  "integer"
      -]
    • removedOutput schema / properties / usage / properties / offer
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / usage / properties / plan / title
      Added value: +"plan"
    • removedOutput schema / properties / usage / properties / plan / type
      Removed value: -"string"
    • addedOutput schema / properties / usage / properties / refills_on / title
      Added value: +"refills_on"
    • removedOutput schema / properties / usage / properties / refills_on / type
      Removed value: -"string"
    • addedOutput schema / properties / usage / properties / throttled / properties / plan / title
      Added value: +"plan"
    • removedOutput schema / properties / usage / properties / throttled / properties / plan / type
      Removed value: -"string"
    • addedOutput schema / properties / usage / properties / throttled / properties / waited_ms / title
      Added value: +"waited_ms"
    • removedOutput schema / properties / usage / properties / throttled / properties / waited_ms / type
      Removed value: -"integer"
    • removedOutput schema / properties / usage / properties / throttled / required
      Removed value: -[
      -  "waited_ms",
      -  "plan"
      -]
    • addedOutput schema / properties / usage / properties / throttled / title
      Added value: +"throttled"
    • removedOutput schema / properties / usage / properties / throttled / type
      Removed value: -[
      -  "null",
      -  "object"
      -]
    • removedOutput schema / properties / usage / required
      Removed value: -[
      -  "plan",
      -  "credits_charged"
      -]
    • addedOutput schema / properties / usage / title
      Added value: +"usage"
    • removedOutput schema / properties / usage / type
      Removed value: -"object"
    • removedOutput schema / required
      Removed value: -[
      -  "id",
      -  "name",
      -  "usage"
      -]
  2. Changed1 schema field changed
    • addedInput schema / properties / per
      Added value: +{
      +  "description": "what the segment counts, as you counted it: workplace or company; omitted saves workplace",
      +  "enum": [
      +    "workplace",
      +    "company"
      +  ],
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"a name for the segment"New value: +"a name for the segment, shown in load's list and on firmafakta.se"
    • changedInput schema / properties / segment / description
      Previous value: -"the segment expression"New value: +"the segment expression in describe's segment language"
  4. Changed4 schema fields changed
    • removedOutput schema / additionalProperties
      Removed value: -false
    • removedOutput schema / properties / usage / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / usage / properties / offer
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / usage / properties / throttled / additionalProperties
      Removed value: -false
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false): it explains that a duplicate name does NOT overwrite but creates a new saved segment, that the result is visible externally on firmafakta.se under Sparade urval, and that the call is refused when the account quota is exhausted. Those are exactly the non-obvious side effects and failure modes an agent needs before writing.

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?

Dense but front-loaded: what is saved, how it is reused, side effects, duplicate behavior, failure mode, and return value arrive in that order with no filler. The semicolon-chained single paragraph is a bit packed, but every clause earns its place.

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?

For a three-parameter write tool with full schema coverage, annotations, and an output schema, the description covers purpose, alternatives, side effects, quota failure, and the returned id. Nothing material is missing for correct invocation.

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?

Schema coverage is 100% and each parameter is already documented, including the 'per' default of workplace when omitted. The description reinforces that per is the counting basis as the caller counted it, but adds little syntax or format detail the schema does not already carry; slightly above baseline for tying 'name' to where it surfaces.

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 (save) and resource (a segment expression) plus the scoping dimension ('per it counts (workplace or company)') and where it lives ('under a name in the account'). It is clearly distinguishable from firmafakta_load (reuse) and firmafakta_update (change an existing one), both of which it names.

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 explicit routing: use this to persist a segment for later reuse with firmafakta_load, and use firmafakta_update instead when the intent is to change an existing saved segment. It also states the precondition under which the call fails ('Refused when the account has no room for more'), so the agent knows the quota boundary.

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.