Skip to main content
Glama

kb_apply_struct

Decode live memory at a given address using a named struct layout, with optional count to parse consecutive struct instances.

Instructions

Apply a struct definition to a memory region.

Reads live memory at the given address and decodes fields according to the struct layout. If count is provided, decodes that many consecutive struct instances (array of structs).

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": {
      "struct_name": "<struct_name>",
      "address": "<address>"
    },
    "name": "kb_apply_struct"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNo
addressYes
struct_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden. It usefully discloses that it reads live memory and that count expands the read into an array of consecutive instances, which implies a read-only, non-mutating operation. It does not address what happens if the struct name is unknown, the address is unmapped, or the memory changes mid-read, nor any cost/limit on large counts.

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?

Four short lines, front-loaded with the core action, then the decode semantics, then the array-of-structs case. The parenthetical "(array of structs)" earns its place by disambiguating count; nothing is padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter decode tool with no annotations and no output schema, the description should say more about the result shape (field names and decoded values) and failure modes. It covers the happy path adequately but leaves the agent guessing about output structure and error behavior.

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 0%, so the description must compensate, and it largely does: address is tied to "live memory at the given address", struct_name to "the struct layout", and count to "that many consecutive struct instances". Only address formatting (hex vs decimal) and whether count defaults to a single instance remain unstated.

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?

The description uses a specific verb+resource pair ("Apply a struct definition to a memory region") and immediately clarifies the operation is a read-and-decode of live memory, not a definition write. The contrast with the sibling kb_define_struct is implied by "apply" rather than "define", but no sibling is named explicitly, so it stops 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the agent must infer that this is the decode step used after a struct has been defined, and that struct_name must reference an existing definition. There is no explicit when-to-use vs alternative guidance and no stated prerequisite ordering relative to kb_define_struct.

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