Skip to main content
Glama

emu_call

Call an x64 function inside the emulator using the Microsoft calling convention; redirect imported function IAT slots first so calls return values instead of faulting.

Instructions

Call a function in the emulator (x64 Microsoft calling convention).

Imported functions fault unless their IAT slots were redirected: call emu_stubs first (or emu_create(stubs=True)) so call kernel32!X returns a value instead of stopping on an unmapped fetch.

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": {
      "key": "<key>",
      "va": "<va>"
    },
    "name": "emu_call"
  }
}

Input Schema

NameRequiredDescriptionDefault
vaYes
keyYes
argsNo
sessionNo
max_stepsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and delivers the most important failure mode: calls to imported functions fault on an unmapped fetch unless stubs were set up. It also discloses the calling convention, which affects how arguments are passed. It omits that execution mutates emulator state (registers/memory), and says nothing about max_steps exhaustion or timeouts.

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 short sentences with zero filler; the primary action is stated first and the blocking prerequisite immediately follows. Nothing is repeated from the name or schema.

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?

An output schema exists, so return values need no explanation, and the stubbing prerequisite is well covered. However, for a 5-parameter execution tool with 0% schema description coverage, the absence of any explanation of va, args formatting, or max_steps leaves a meaningful gap.

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

Parameters2/5

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

Schema description coverage is 0% across 5 parameters, so the description must compensate and largely does not. The calling convention hints at how args should be formatted, but key, va, args encoding, session, and max_steps are left entirely to undifferentiated schema titles.

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 and resource ("Call a function in the emulator") and pins down the calling convention (x64 Microsoft), so the agent knows exactly what operation this performs. It does not differentiate against siblings like emu_run or emu_step, which also advance execution, so an agent must infer why it would call a function directly rather than run/step.

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 description gives an explicit precondition and names the alternative that must be used first: imported functions fault unless IAT slots are redirected, so call emu_stubs or emu_create(stubs=True). That is real when-to-use routing. It stops short of saying when to pick emu_call versus emu_run/emu_step for non-imported addresses.

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