Skip to main content
Glama

Compute Compute Axis Weights

aps_compute_compute_axis_weights
Read-onlyIdempotent

Compute normalized C-axis weight shares from provider prompt and completion token billing records for attribution inputs.

Instructions

Compute the C-axis fractional weight vector from a list of inference billing records (prompt_tokens, completion_tokens). Returns canonical ComputeAxisEntry[] with 6-digit decimal compute_share strings that sum to ~1.0 and feed directly into aps_construct_attribution_primitive. Weights = prompt_tokens + completion_tokens × COMPLETION_MULTIPLIER (default 3.0), then normalized. Parameter names match the SDK: providers, optional profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileNoOptional WeightProfile override; defaults to DEFAULT_WEIGHT_PROFILE
providersYesPer-provider billing records

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / providers / items / additionalProperties
      Removed value: -false
  2. Addedv2.8.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), and the description goes beyond them by disclosing the output shape (canonical ComputeAxisEntry[] with 6-digit decimal compute_share strings summing to ~1.0) and the exact weighting formula with a default COMPLETION_MULTIPLIER of 3.0. It omits edge-case behavior (empty provider list, all-zero tokens, rounding/precision guarantees), keeping it short of 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four tight sentences, front-loaded with what is computed and followed by output shape, formula, and parameter notes. Each sentence carries information, though the formula sentence is dense and could be marginally tighter.

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?

With no output schema, the description carries the return-value burden and discharges it by naming the return type and the sum-to-~1.0 invariant. Combined with the downstream linkage to aps_construct_attribution_primitive, it is nearly complete; only error/edge-case behavior is unaddressed.

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%, so the baseline is 3, but the description adds real meaning: it explains that `providers` entries are inference billing records whose prompt_tokens and completion_tokens drive the weighting formula, and that `profile` is an optional override. It also notes parameter names match the SDK, aiding caller construction.

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 — 'Compute the C-axis fractional weight vector from a list of inference billing records' — and even specifies the input fields (prompt_tokens, completion_tokens). The 'C-axis'/'compute' framing implicitly distinguishes it from the sibling aps_compute_data_axis_weights, so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear downstream context: the output 'feed[s] directly into aps_construct_attribution_primitive,' which tells the agent where this sits in the workflow. It does not, however, state exclusions or explicitly contrast with aps_compute_data_axis_weights, so it stops short of full when/when-not guidance.

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