Skip to main content
Glama
MIRAI Intelligence & Research MCP

MIRAI Intelligence & Research MCP

by Tarant336

C2 protocol specification reconstruction

c2_protocol_analyze
Read-onlyIdempotent

Reconstruct a C2 protocol specification from authorized source code, binaries, or packet captures, documenting framing, fields, byte order, and command IDs for defensive analysis.

Instructions

Reconstruct the C2 protocol specification from authorized source (struct definitions, command-ID defines, send/recv ordering), from a binary (string tables and constants), or from an authorized packet capture (offline message framing, headers, message types, lengths, field offsets, byte order and command identifiers, each with confidence and provenance). Emits a c2_protocol_spec knowledge record. Documentation of the protocol for defensive understanding only — never connects to a live C2 and never builds a client or server.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "c2_protocol_analyze"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathNoBinary sample inside the workspace.
pcapPathNoAuthorized PCAP/PCAPNG capture inside the workspace; TCP streams are reassembled and framed offline (documentation only).
sourcePathNoAuthorized source file or directory inside the workspace.
protocolHintsNoAnalyst-supplied protocol hints.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety bar is partly met; the description still adds real value by stating the tool never connects to a live C2, never builds a client or server, and that capture analysis is offline with per-field confidence and provenance. It does not say what happens on unparseable input, whether partial results are returned, or what authorization actually looks like in practice.

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: the first is front-loaded with the verb and then walks the three sources, the second is a compact scope/safety boundary. The long parenthetical enumeration is dense but every clause carries information an agent needs, and nothing is repeated from the schema verbatim beyond unavoidable naming.

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?

With no output schema, the description must convey the return value, and it does name the emitted c2_protocol_spec record and the kinds of fields it carries (framing, headers, message types, lengths, offsets, byte order, command IDs, confidence, provenance). It stops short of describing the record's structure or how confidence is computed, which leaves a modest gap for a tool whose whole product is a structured record.

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 coverage is 100%, so the schema already defines all four parameters including the offline reassembly note on pcapPath. The description adds only the high-level notion that each path is an alternative evidence source; it gives no extra meaning for protocolHints (e.g., expected format, effect on confidence scoring) and does not discuss whether paths can be combined.

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 artifact — 'reconstruct the C2 protocol specification' — and enumerates the three evidence sources (source, binary, packet capture) plus the emitted c2_protocol_spec record. This is clearly distinguishable from pcap_analyze or c2_beacon_detect, which inspect traffic or detect beaconing rather than producing a protocol specification record.

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 three input modes are mapped to their parameters (sourcePath, filePath, pcapPath), so an agent can infer which parameter selects which analysis path. What is missing is any explicit routing against siblings such as pcap_analyze or protocol_fingerprint — no 'use this instead of X when...' statement, and no guidance on what to do when only a capture is available.

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

Deploy Server

Other Tools