Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

vector_stats

Read-onlyIdempotent

Compute statistics for a float vector or matrix of vectors: mean, std, L2 norm, min, max, sparsity, top-K indices. Useful for debugging embedding quality and analyzing vector distributions in a vector DB.

Input Schema

NameRequiredDescriptionDefault
top_kNoReturn indices of top K absolute values (default: 5)
matrixNoMatrix of vectors (overrides vector). Returns per-vector + matrix-level stats. Required unless `vector` is given.
vectorNoSingle vector to analyze. Required unless `matrix` is given.

Output Schema

NameRequiredDescriptionDefault
maxNo
minNo
stdNo
meanNo
l2_normNo
sparsityNo
dimensionNo
per_vectorNo
matrix_shapeNo
matrix_statsNo
top_k_indicesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "vector": [
      +      1,
      +      2,
      +      3,
      +      4
      +    ]
      +  }
      +]
  2. Changed3 schema fields changed
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "required": [
      +      "vector"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "matrix"
      +    ]
      +  }
      +]
    • changedInput schema / properties / matrix / description
      Previous value: -"Matrix of vectors (overrides vector). Returns per-vector + matrix-level stats."New value: +"Matrix of vectors (overrides vector). Returns per-vector + matrix-level stats. Required unless `vector` is given."
    • changedInput schema / properties / vector / description
      Previous value: -"Single vector to analyze"New value: +"Single vector to analyze. Required unless `matrix` is given."
  3. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "dimension": {},
      +  "l2_norm": {
      +    "type": "number"
      +  },
      +  "matrix_shape": {
      +    "type": "array"
      +  },
      +  "matrix_stats": {
      +    "type": "object"
      +  },
      +  "max": {
      +    "type": "number"
      +  },
      +  "mean": {
      +    "type": "number"
      +  },
      +  "min": {
      +    "type": "number"
      +  },
      +  "per_vector": {},
      +  "sparsity": {
      +    "type": "number"
      +  },
      +  "std": {
      +    "type": "number"
      +  },
      +  "top_k_indices": {}
      +}
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered by structured data and the bar is lower. The description adds computation semantics but nothing about output shape, defaults, ordering, or edge cases (empty vector, NaN handling) — the gaps in behavior are filled by the output schema rather than the prose.

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 sentences, zero waste, with the capability statement front-loaded and the motivation second. Nothing in it repeats the schema or the annotations.

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?

Given an output schema (return values need no explanation), complete parameter descriptions, and annotations covering safety, the description is sufficient to invoke the tool correctly. The only minor gap is that the anyOf constraint (exactly one of vector/matrix required) is left entirely to the schema.

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%: vector, matrix and top_k each carry their own descriptions, including the 'matrix overrides vector' precedence. The description only echoes 'top-K indices' and adds no syntax, format, or default detail beyond what the schema already provides, so 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 and resource ('Compute statistics for a float vector or matrix of vectors') and enumerates the exact stats produced (mean, std, L2 norm, min, max, sparsity, top-K), which lets an agent distinguish it from vector_similarity or normalize_vector. It stops short of naming those siblings explicitly, so differentiation is inferred rather than stated.

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?

The second sentence gives a use context ('debugging embedding quality', 'analyzing vector distributions in a vector DB'), which is more than nothing. However, it names no alternatives and gives no when-not conditions (e.g. use vector_similarity for pairwise comparison, normalize_vector to transform), leaving routing to inference.

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.