Skip to main content
Glama
MarwanDevSpace

mcp-flutter-apk-injector

Update session memory and patch telemetry

update_agent_memory
Destructive

Record notes, workspace metadata, and verified patch history in active reverse-engineering session state. Persists updates to session_state.json to keep agent telemetry synchronized after manual Smali edits or manifest changes.

Instructions

Update the active reverse-engineering session memory with notes, target Android workspace metadata, or verified patch history records. Mutates session state in-memory and automatically persists updates to .mcp_memory/session_state.json in workspaceDir; non-null fields merge into state, notes are appended, and patchType with patchDetails logs a verified entry. Use after manual Smali edits, manifest changes, or decompiler discoveries to keep agent telemetry synchronized; use get_agent_context or query_memory_graph instead when inspecting memory without modification.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoEngineer or agent observation note to append to the active session memory log (deduplicated automatically)
patchTypeNoCategory of applied patch (e.g. 'smali_insert', 'smali_create', 'manifest_edit', 'asset_mod', 'security_bypass')
packageNameNoTarget Android application package identifier (e.g. 'com.example.targetapp')
patchDetailsNoDescriptive summary of the applied modification (paired with patchType to record a verified entry in patchHistory)
workspaceDirNoAbsolute or relative path to target decompiled APK workspace directory containing AndroidManifest.xml and Smali files
entryActivityNoFully qualified class name of launcher/main entry Activity (e.g. 'com.example.targetapp.MainActivity')
applicationClassNoFully qualified class name of Android Application subclass (e.g. 'com.example.targetapp.MainApplication')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYesStatus of the memory state update operation.
updatedMemoryYesComplete updated session memory state after applying modifications and persisting to disk.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.1.4
    • changedInput schema / properties / applicationClass / description
      Previous value: -"Application class name"New value: +"Fully qualified class name of Android Application subclass (e.g. 'com.example.targetapp.MainApplication')"
    • changedInput schema / properties / entryActivity / description
      Previous value: -"Launcher/Entry Activity name"New value: +"Fully qualified class name of launcher/main entry Activity (e.g. 'com.example.targetapp.MainActivity')"
    • changedInput schema / properties / note / description
      Previous value: -"Agent note to persist in session memory"New value: +"Engineer or agent observation note to append to the active session memory log (deduplicated automatically)"
    • changedInput schema / properties / packageName / description
      Previous value: -"Target Android package name"New value: +"Target Android application package identifier (e.g. 'com.example.targetapp')"
    • changedInput schema / properties / patchDetails / description
      Previous value: -"Description of patch applied"New value: +"Descriptive summary of the applied modification (paired with patchType to record a verified entry in patchHistory)"
    • changedInput schema / properties / patchType / description
      Previous value: -"Type of patch applied (e.g., smali_insert, manifest_edit)"New value: +"Category of applied patch (e.g. 'smali_insert', 'smali_create', 'manifest_edit', 'asset_mod', 'security_bypass')"
    • changedInput schema / properties / workspaceDir / description
      Previous value: -"Decompiled APK workspace path"New value: +"Absolute or relative path to target decompiled APK workspace directory containing AndroidManifest.xml and Smali files"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "status": {
      +      "description": "Status of the memory state update operation.",
      +      "enum": [
      +        "success",
      +        "error"
      +      ],
      +      "type": "string"
      +    },
      +    "updatedMemory": {
      +      "additionalProperties": {},
      +      "description": "Complete updated session memory state after applying modifications and persisting to disk.",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "updatedMemory"
      +  ],
      +  "type": "object"
      +}
  2. Addedv0.1.3

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description adds significant behavioral detail: it mutates in-memory state, persists to .mcp_memory/session_state.json, merges non-null fields, appends notes, and logs verified patch entries when patchType and patchDetails are provided. This goes well beyond the annotations and gives the agent a precise mental model of side effects.

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?

The description is two dense, front-loaded sentences. The first sentence states purpose and behavior, the second gives usage context. Every clause earns its place; no filler or redundancy. The structure is ideal for quick agent parsing.

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

Completeness5/5

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

For a tool with 7 parameters, 0 required, and an output schema, the description covers the essential context: what it does, when to use it, how it behaves, and the exact persistence path. It does not waste space explaining return values (output schema handles that). Nothing critical is missing for correct invocation.

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?

While the schema covers all 7 parameters with descriptions (100% coverage), the tool description adds interaction semantics: 'non-null fields merge into state' and 'notes are appended' clarify how parameters combine, and it explains the patchType+patchDetails pairing for logging. This is meaningful beyond the schema, though the baseline is already 3 due to high schema coverage.

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 description clearly states the verb 'update' and the resource 'active reverse-engineering session memory', and enumerates the specific content types (notes, workspace metadata, patch history). It also differentiates from siblings by explicitly naming get_agent_context and query_memory_graph as inspection alternatives, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: 'Use after manual Smali edits, manifest changes, or decompiler discoveries to keep agent telemetry synchronized.' It also states when NOT to use it ('use get_agent_context or query_memory_graph instead when inspecting memory without modification'), providing clear alternatives and exclusions.

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