Skip to main content
Glama

migrate_legacy_code

Converts legacy XposedBridge or EdXposed code into modern, type-safe LibXposed code, helping developers migrate hooks, preferences, and APIs with clear migration guidance.

Instructions

Convert legacy XposedBridge / EdXposed code (e.g., handleLoadPackage, findAndHookMethod, XC_MethodHook, XSharedPreferences) into modern, type-safe LibXposed code.

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": "migrate_legacy_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
legacySnippetNoOptional legacy code snippet or API name to look up migration guidance for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does usefully disclose the migration scope by listing which legacy APIs are covered, which is context the schema does not provide. However, it never says whether the tool returns rewritten code or lookup/guidance text, nor whether the operation is read-only or stateless — a meaningful gap given the ambiguity between "convert" and the schema's "look up migration guidance".

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?

One sentence, front-loaded with the conversion direction, and the parenthetical examples earn their place by naming exactly which legacy symbols are in scope. Nothing is redundant or padded.

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?

For a single-optional-parameter tool with no output schema and no annotations, the key remaining unknowns are what the call returns and what happens with no snippet; the description leaves both unstated. Otherwise the scope and domain are sufficiently defined for an agent to call it correctly.

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 single optional legacySnippet parameter is already documented, and the description adds no syntax, format, or expected-input detail beyond restating the legacy API family names. Baseline 3 applies since the schema does the work.

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?

"Convert legacy XposedBridge / EdXposed code ... into modern, type-safe LibXposed code" gives a specific verb (convert) and a precise resource pair (legacy hooking API → LibXposed), reinforced by concrete legacy symbols (handleLoadPackage, findAndHookMethod, XC_MethodHook, XSharedPreferences). It does not name or contrast any of the sibling tools (e.g., get_api_doc, get_scaffold), 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: an agent can infer this is for migration tasks rather than fresh API lookup, but the description never states when to choose it over get_api_doc, search_libxposed, or check_api_compatibility. No exclusions or prerequisites are given.

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