Skip to main content
Glama

aegis_calculate_entropy

Calculates Shannon entropy of a binary or byte payload to detect packing, obfuscation, or encryption, helping triage suspicious or high-risk files.

Instructions

Calculates Shannon entropy (0.0 to 8.0) of a binary or byte payload to detect packing, obfuscation, or encryption.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>"
    },
    "name": "aegis_calculate_entropy"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathYesPath to binary file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden and it does disclose the normalized 0.0–8.0 output scale, which is genuinely useful context. However it says nothing about being a read-only analysis, how much of a large file is read, cost/latency, or behavior on unreadable or empty files.

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?

A single sentence that front-loads the operation and output range, then the interpretive purpose. No filler, no redundancy.

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?

For a one-parameter, no-output-schema analysis tool, the description covers what it computes, the value range, and why you'd run it. The main omission is threshold interpretation (e.g., what entropy value suggests packed versus encrypted data), which would make the result actionable without follow-up.

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?

There is a single parameter with 100% schema description coverage, so the baseline of 3 applies. The description adds only the notion of a 'binary or byte payload' and does not clarify file size limits, encoding expectations, or whether directories are accepted.

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 ('Calculates') and resource ('Shannon entropy') plus the output scale (0.0 to 8.0) and the payload type it accepts. It is unambiguous against siblings like aegis_inspect_binary, but it never explicitly names or contrasts them, so it falls just short of a 5.

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?

The phrase 'to detect packing, obfuscation, or encryption' gives a clear investigative context that tells an agent when this tool is relevant. There is no explicit when-not guidance or pointer to aegis_inspect_binary for structural analysis instead.

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