Skip to main content
Glama

Percentage

percentage
Read-onlyIdempotent

Compute the exact percentage of a part relative to a total, evaluating rational expressions precisely.

Instructions

Exact share and percentage of PART / TOTAL. Use calc_exact for a single arithmetic expression, or compare_threshold to check the result against a threshold rather than just compute it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partYesNumerator expression (rationals accepted), evaluated exactly
totalYesDenominator expression (rationals accepted), evaluated exactly

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.12.0
    • addedInput schema / properties / part / description
      Added value: +"Numerator expression (rationals accepted), evaluated exactly"
    • addedInput schema / properties / total / description
      Added value: +"Denominator expression (rationals accepted), evaluated exactly"
  2. Changed1 schema field changedv0.11.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "percentageDictOutput",
      +  "type": "object"
      +}
  3. Changed5 schema fields changedv0.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / part / title
      Added value: +"Part"
    • addedInput schema / properties / total / title
      Added value: +"Total"
    • addedInput schema / title
      Added value: +"percentageArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  4. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already communicate read-only, idempotent, and non-destructive behavior. The description adds the key behavioral detail that computation is exact, which is useful beyond the annotations. The presence of an output schema reduces the need to describe return-value details.

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 description is two sentences with no filler. The core function is front-loaded, and the sibling alternatives are mentioned in a compact second sentence.

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 simple pure-calculation tool with fully described required parameters, rich read-only/idempotent annotations, and an output schema, the description is complete. It also names the relevant sibling tools to prevent misrouting.

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 description coverage is 100%, with part and total already described as numerator and denominator expressions evaluated exactly. The description adds no additional parameter-specific meaning beyond what the schema provides, so the baseline of 3 is appropriate.

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 the tool computes the exact share and percentage of PART / TOTAL, and it names calc_exact and compare_threshold as distinct siblings. This gives an agent a precise resource and operation, so it can tell this tool apart from related calculation tools.

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?

The description explicitly says when to use calc_exact for a single arithmetic expression and compare_threshold for threshold checking instead. This gives clear routing guidance and leaves no ambiguity about when percentage is the right tool.

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