Skip to main content
Glama

Extraer una clave de cada objeto

array-pluck
Read-onlyIdempotent

Extrae el valor de una clave de cada objeto de un arreglo. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: agrupar objetos por el valor de una clave y devolver grupos y conteos (array-group-by). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Extracts the value at a key (dotted path) from every object in an array; missing values become null or are dropped. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: grouping objects by the value of a key (array-group-by). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.

Input Schema

NameRequiredDescriptionDefault
keyYesObject key (dotted path allowed) to compare by (string; required; up to 500 chars).
itemsYesArray (array; required).
drop_missingNoDrop items without the key (boolean; optional; default false).

Output Schema

NameRequiredDescriptionDefault
valuesNoany JSON value

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / items / examples
      Added value: +[
      +  [
      +    {
      +      "u": {
      +        "id": 1
      +      }
      +    },
      +    {
      +      "u": {
      +        "id": 2
      +      }
      +    },
      +    {}
      +  ]
      +]
    • addedInput schema / properties / key / examples
      Added value: +[
      +  "u.id"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

The description's side-effect, determinism, and no-network statements align with the annotations (readOnlyHint, idempotentHint, openWorldHint=false) rather than contradicting them. It adds genuinely new operational context the annotations do not carry: 64 KB input cap, 1 s per call, and 1 MB result cap, which are important for planning large batches.

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 and cleanly labeled (When / Not for / Side effects / Deterministic / Limits), so an agent can scan for the relevant clause. The full bilingual duplication roughly doubles the length, which is a deliberate accessibility trade-off but not free.

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 3-parameter pure transform with an output schema, the definition covers scope, alternative routing, safety profile, determinism, and hard resource limits. Nothing an agent needs to invoke it correctly is missing, and return-value shape is rightly left to the output schema.

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 would be 3, but the description adds behavior the schema only implies: missing values become null or are dropped, which explains the effect of drop_missing rather than just its type. Dotted-path keys are reinforced in prose, though no extra format or escaping rules are given.

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 and resource: extracts the value at a key (dotted path) from every object in an array, including null/drop semantics for missing keys. It explicitly contrasts itself with array-group-by, so an agent can distinguish it from the other array-* siblings without opening a schema.

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?

Contains explicit 'Cuándo/When' guidance (transform, compare, or check structured data exactly) and an explicit 'No para/Not for' clause naming the alternative tool array-group-by and the exact behavior that belongs to it. No inference is required to pick between them.

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.

Resources