Skip to main content
Glama

Count a segment

firmafakta_count
Read-only

Count a segment, read it back in words. per is required: workplace counts every workplace, company counts each company once (its main workplace). Costs credits; see describe.

Input Schema

NameRequiredDescriptionDefault
perYesrequired: workplace (a row per workplace) or company (a row per company, its main workplace)
segmentYesthe segment expression; see firmafakta_describe

Output Schema

NameRequiredDescriptionDefault
unitYes
countYes
usageYes
readbackYes
sole_proprietorshipsYesdeprecated, always 0: sole proprietorships are not counted; kept for clients that cached the earlier schema

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / sole_proprietorships / description
      Added value: +"deprecated, always 0: sole proprietorships are not counted; kept for clients that cached the earlier schema"
    • changedOutput schema / required
      Previous value: -[
      -  "count",
      -  "sole_proprietorships",
      -  "unit",
      -  "readback",
      -  "usage"
      -]New value: +[
      +  "count",
      +  "unit",
      +  "readback",
      +  "usage",
      +  "sole_proprietorships"
      +]
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations cover the read-only/safe profile, so the bar is lower, and the description still adds two useful facts: the operation consumes credits (a cost side effect not visible in annotations) and results are returned in words. It doesn't quantify cost or explain pagination, keeping it from a 5.

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?

Two terse sentences, front-loaded with the action and return shape, then the key constraint and cost warning. No filler; the only redundancy is the per restatement, which is minor.

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?

An output schema exists so return format need not be described, annotations cover safety, and the description adds the cost warning plus a pointer to firmafakta_describe for building the segment expression. Nothing essential for a correct call is missing.

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% and the schema's own enum description already explains workplace vs company. The description largely restates that same semantics ('workplace counts every workplace, company counts each company once'), adding little beyond 'per is required', which the required array already encodes. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (count) and resource (segment) and adds that the result is returned 'in words', which tells the agent what to expect. It doesn't distinguish itself from siblings like firmafakta_fetch or firmafakta_lookup beyond a pointer to describe, so it stops short of a 5.

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?

'Costs credits; see describe' gives a cost warning and a pointer to the discovery tool, and the per explanation implies the counting granularity. But there is no explicit statement of when to use count versus fetch/lookup/find_codes, which is the main routing decision the agent faces.

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.