Skip to main content
Glama

wiki_aggregate

Compute an aggregate over the wiki's entities — count / sum / avg / min / max of a numeric field across a whole kind, with an optional numeric 'where' filter. Use for 'how many…', 'what's the average/total/highest…' questions. 'count' needs no field (counts entities, or those matching 'where'); sum/avg/min/max require a 'field'. Supports the same optional 'category' scope as wiki_rank (food/item/species). Kinds and field names are the SAME as wiki_rank — see that tool's per-kind field lists. Example: { kind: "recipe", metric: "count", where: { field: "skill_level", op: ">", value: 5 } } → how many recipes need skill level above 5. Scoped: { kind: "food", metric: "avg", field: "calories", category: "vegetable" } → average calories of vegetables. Optional character/server PROFILE (skill_level/skills, talents, modules/module, server) recomputes the same profile-sensitive metrics as wiki_rank (recipe labor/craft_minutes; tool damage/calories_burn/durability_burn; item harvest_yield/power_watts; species yield_total/yield_min_total); static fields ignore it (the result carries a note). No profile = base aggregate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesWhich entity set to aggregate over.
fieldNoNumeric field for sum/avg/min/max (required for those). Optional for count — with a field, count includes only entities that have it.
whereNoOptional single numeric filter applied before ranking/aggregating, e.g. { field: "weight", op: "<", value: 1000 }. The field must come from the same per-kind set as 'by'/'field'.
metricYesWhich aggregate to compute.
moduleNoA single module name/type, or a comma-separated list (alternative to modules[]).
serverNoModel a DIFFERENT server's difficulty (default = this server's real settings; omit for accurate answers). Fields: craftResource, craftTime, growth, garbageRatio, fuelEfficiency, foodVariety, foodTastiness, baseGain, minBalanced, maxBalanced. Only craft_minutes is server-sensitive for ranking.
skillsNoPer-skill levels: { "<skill FullName>": level }. Overrides skill_level for those skills.
modulesNoUpgrade-module names/types installed (multiple slots stack).
talentsNoTalent names/types to treat as learned (profile-sensitive metrics only).
categoryNoOptional: scope to ONE tag/category before ranking/aggregating, e.g. "seed", "vegetable", "gun". Only the tagged kinds (food / item / species) support this. Use the category's name from a wiki_search result; matching is case- and plural-insensitive.
skill_levelNoA single skill level applied to every governing skill (profile-sensitive metrics only).

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It explains metric-field relationships ('count' needs no field; sum/avg/min/max require a field), the behavior of static fields with profiles ('static fields ignore it (the result carries a note)'), and the default ('No profile = base aggregate'). It also details profile-sensitive metrics explicitly (recipe labor/craft_minutes, tool damage/calories_burn/durability_burn, etc.), adding significant behavioral nuance beyond the schema.

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 dense but well-structured. It front-loads the purpose, then gives usage guidance, examples, and profile-sensitivity details in a logical order. Each sentence earns its place—no filler. The use of inline JSON examples improves scannability and comprehension.

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 tool with 11 parameters, nested objects, and no output schema, the description is remarkably complete. It covers all key behaviors: metrics, filters, category scoping, profile recomputation, and default behavior. The examples illustrate typical queries and answer the implicit 'what does the result mean' question. It also appropriately delegates field-list details to wiki_rank rather than duplicating them.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds substantial meaning beyond field names. It maps the `where` filter to a concrete example, clarifies that `category` mirrors wiki_rank, and explains how profile parameters (skills, talents, modules, server) interact with different field types. It also disambiguates count with/without a field, which is not fully expressed in the schema alone.

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 opens with a specific verb+resource+scope: 'Compute an aggregate over the wiki's entities — count / sum / avg / min / max of a numeric field across a whole kind, with an optional numeric where filter.' It clearly distinguishes from siblings like wiki_rank (ranking) and wiki_get (fetch) and mentions the same category scope as wiki_rank. The 'Use for...' phrasing reinforces its purpose.

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?

It explicitly states when to use: "Use for 'how many…', 'what's the average/total/highest…' questions." It also points to wiki_rank for per-kind field lists, which serves as a reference. However, it does not explicitly state when NOT to use it or name alternative tools for different tasks (e.g., ranking), only referencing wiki_rank for field lists rather than as an alternative.

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.

TDQS

A3.9/5.0
Disambiguation3/5

Most tools have distinct purposes (fetch, wiki_get, wiki_rank, wiki_calc, etc.), but search and wiki_search are clearly duplicated full-text search tools, and fetch vs wiki_get could be confused initially. Descriptions help but the overlap is notable.

Naming Consistency2/5

Naming is inconsistent: 'fetch' and 'search' lack the 'wiki_' prefix used by others, and there is a mix of verb-based (get, rank, calc) and noun-based (bom, contract_basics) names. Having both 'search' and 'wiki_search' for the same functionality is a clear naming violation.

Tool Count4/5

10 tools is within the ideal 3-15 range for a wiki server, covering search, retrieval, analytics, and recipe calculations. However, one tool is essentially redundant (search vs wiki_search), making the count slightly padded.

Completeness4/5

The tool surface covers the core wiki workflow: search, fetch markdown, read structured facts, rank/aggregate numeric data, and compute recipe-related metrics (BOM, raw materials, exact calc). Minor gaps like listing all entities of a kind without ranking, but overall no dead ends.

Resources