Skip to main content
Glama

Compute Data Axis Weights

aps_compute_data_axis_weights
Read-onlyIdempotent

Compute normalized D-axis fractional weights from AccessReceipt sources using role, recency, and content length, returning canonical entries for attribution primitives.

Instructions

Compute the D-axis fractional weight vector from a list of AccessReceipt records with role, timestamp, and content length. Returns canonical DataAxisEntry[] with 6-digit decimal contribution_weight strings that sum to ~1.0 and feed directly into aps_construct_attribution_primitive. Empty input returns an empty array, and all-zero raw weights return an error. Weights = role × recency_decay × length_weight, then normalized. Parameter names match the SDK: sources, action_timestamp, optional profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileNoOptional WeightProfile override; defaults to DEFAULT_WEIGHT_PROFILE
sourcesYesPer-source records with retrieval metadata
action_timestampYesISO-8601 UTC ms when the action ran (t_action)

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 / sources / items / additionalProperties
      Removed value: -false
  2. Addedv2.8.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds substantial extra context: the exact return shape (DataAxisEntry[] with 6-digit decimal strings summing to ~1.0), the weighting formula, and two distinct error/edge behaviors.

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?

Front-loaded with the core action, then return shape, edge cases, formula, and parameter note in a compact block. Dense but every clause carries information, though the parameter-naming sentence is the weakest.

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?

With no output schema, the description properly explains the return value (canonical DataAxisEntry[] with normalized 6-digit weights) and error behavior. An agent has everything needed to call and interpret this tool correctly.

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%, so the schema already documents all three parameters including enum values and formats. The description only restates the parameter names and notes profile is optional, adding no syntax or semantic detail beyond the schema.

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 (Compute) and resource (D-axis fractional weight vector from AccessReceipt records) with clear scope. It also names the downstream sibling it feeds into (aps_construct_attribution_primitive), helping distinguish it from related aps_compute_* tools.

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?

Gives clear context that the output feeds directly into aps_construct_attribution_primitive and describes boundary conditions (empty input -> empty array, all-zero raw weights -> error). However, it never explicitly names an alternative tool or a when-not-to-use condition.

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