Skip to main content
Glama

Instrument With Frida

instrument_with_frida
Destructive

Runs a caller-authored Frida script against a selected process in attach or spawn mode, then detaches after the observation window for ephemeral instrumentation.

Instructions

Run one caller-authored Frida script against an explicitly selected process and detach when the observation window ends. The CLI and MCP share this ephemeral workflow; use MCP session operations for persistent sessions. Remote authentication is used only for this call and excluded from Evidence.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pid": 1234,
      "mode": "attach",
      "source": "send(Process.id);",
      "device_id": "local",
      "duration_ms": 1000,
      "source_kind": "inline"
    },
    "name": "instrument_with_frida"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNo
argvNo
modeYesOperation mode that selects the requested behavior.
pathNoLocal filesystem path used by this operation.
remoteNo
sourceNo
programNo
device_idNo
duration_msNo
source_kindYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, and idempotentHint=false, so the safety profile is partly carried by structured data. The description adds genuinely useful behavior beyond that: the workflow is ephemeral and self-detaching, and remote credentials are scoped to this single call and excluded from Evidence. However, it never explains why the operation is destructive (e.g., what attaching or spawning does to the target process, or whether a failed attach can leave state behind), which is the single most important thing an agent needs before invoking a destructive tool.

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?

Three sentences, front-loaded with the core action and lifecycle before the alternative and the auth caveat. Every sentence carries information, though the closing 'excluded from Evidence' clause is opaque without knowing what Evidence means in this system.

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 10-parameter destructive tool with no output schema, the definition covers purpose, lifecycle, an alternative route, and credential handling. It still leaves out what the call returns or how script output is surfaced, why the operation is flagged destructive, and how spawn mode differs operationally from attach, so an agent has meaningful unknowns before invoking it.

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 description coverage is only 20% across 10 parameters, so the description must compensate, and it does so only at a conceptual level: 'explicitly selected process' maps loosely to pid/program, 'caller-authored script' to source/source_kind/path, 'observation window' to duration_ms, and 'remote authentication' to the remote object. It gives no guidance on the attach-vs-spawn mode, inline-vs-file source_kind, or the duration_ms default and 0-60000 range, leaving the agent to infer these from the schema.

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?

The first sentence names a specific verb ('Run one caller-authored Frida script'), a specific target ('an explicitly selected process'), and the terminal behavior ('detach when the observation window ends'). This cleanly separates it from the persistent session siblings (start_frida_session, load_frida_script) without the agent needing to open either schema.

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?

It gives an explicit alternative class: 'use MCP session operations for persistent sessions,' which tells the agent when not to use this tool. The gap is that it names the category rather than a concrete sibling such as start_frida_session, so the agent must map 'session operations' to actual tool names itself.

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