Skip to main content
Glama
ShieldLabs-ai

@shieldlabs-ai/mcp

Official

Summarize user, device, visitor or IP

shieldlabs_summarize_entity
Read-onlyIdempotent

Aggregate recent History API identifications for an account, device, visitor, IP, or cookie to count distinct entities, countries, risk scores, flags, and signals.

Instructions

Aggregate the recent History API identifications of one account (user_hid), device (device_id), browser visitor (visitor_id), IPv4 address (ip) or cookie (cookie_id).

The result is computed by this server from the returned history window (the most recent max_items identifications), and labelled as such: it is not a ShieldLabs verdict. It counts distinct devices, accounts, visitors, countries, IPs and connection types (with the top values), the highest and average Risk Score, band counts, rate-limit markers, detection flags and risk signals seen with counts, and the first and last observed time.

Use it for questions such as: how many accounts used this device, how many devices this account used, which countries an account came from, whether an IP sent automated traffic. Use shieldlabs_search_history to see the individual identifications.

Args:

  • type ('user_hid' | 'device_id' | 'visitor_id' | 'ip' | 'cookie_id')

  • value (string): UUID for the ID types, dotted IPv4 for ip, exact User HID for user_hid

  • max_items (number): 1-500, default 100

  • response_format ('markdown' | 'json'): default 'markdown'

Returns (json): { "lookup": { type, value }, "computed_from": string, "window": { identifications_analyzed, total_matching, max_items, complete }, "summary": { identifications_analyzed, first_observed_at, last_observed_at, devices: { distinct, top: [{ value, count, truncated? }] }, users, visitors, countries, ips, connection_types, anonymous_identifications, identifications_without_account, identifications_without_device_signals, risk: { max_risk_score, average_risk_score, worst_band, band_counts: { trusted, suspicious, dangerous }, rate_limit_markers }, flags_seen: [{ flag, count }], signals_seen: [{ name, count }], distinct_signals }, "untrusted_data_note": string }

The user count ignores values that do not name an account: null, "anonymous", "fail", "-1" and "unknown". The device count ignores the all-zero device ID (no usable device signals). Averages ignore the 999 rate-limit marker. The History API limit (about 15 requests per second per domain) is shared with the site's own backend: start with the default max_items and raise it only when the window is incomplete and the question needs older identifications.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesWhat to summarize: user_hid (one of your accounts), device_id (one device), visitor_id (one browser visitor), ip (one IPv4 address) or cookie_id (one browser profile)
valueYesIdentifier value: a UUID for device_id, visitor_id and cookie_id; a dotted IPv4 address such as 203.0.113.24 for ip; the exact User HID string for user_hid ("anonymous" summarizes anonymous checks; a User HID that contains "/" cannot be searched)
max_itemsNoMost recent identifications to analyze, from 1 to 500 (default 100). Each 100 identifications cost one History API request, from the domain's shared limit.
response_formatNoOutput format: 'markdown' (default) for readable text, 'json' for structured datamarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
lookupYes
windowYes
summaryYes
computed_fromYes
untrusted_data_noteYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, openWorld), but the description goes well beyond them: it discloses that results are server-computed from the returned window rather than a ShieldLabs verdict, documents which values are excluded from counts (null, 'anonymous', 'fail', '-1', 'unknown', all-zero device ID, 999 rate-limit marker), and warns about the shared ~15 req/s History API limit.

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 purpose, then use cases, then args, then behavior; each section is dense and earns its place. The verbose Returns dump is largely redundant with the existing output schema, which is the only real conciseness cost.

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 4-parameter aggregation tool with an output schema and full annotations, the description covers identification of scope, counting semantics, edge cases, rate limits and output format. An agent has everything needed to call it correctly and interpret the result.

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 description coverage is 100%, so baseline is 3, but the description adds real meaning beyond the schema: value formats (UUID for ID types, dotted IPv4 for ip, exact User HID), the 'anonymous' special case, the '/' restriction, and the cost model for max_items (each 100 identifications = one History API request from a shared limit).

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 (Aggregate) and resource (recent History API identifications) and enumerates the five entity types it operates over. It explicitly distinguishes itself from the sibling tool by directing the agent to shieldlabs_search_history for individual identifications.

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?

Gives concrete when-to-use questions ('how many accounts used this device', 'whether an IP sent automated traffic') and names the alternative (shieldlabs_search_history) with the condition that selects it. It also advises starting with the default max_items and raising it only when the window is incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.