Skip to main content
Glama

smali_read_class

Reads the smali source of a specified class from a smali directory, supporting both com.foo.Bar and com/foo/Bar formats for Android reverse engineering.

Instructions

读取指定类的 smali 源码。className 支持 com.foo.Bar 或 com/foo/Bar。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
smaliDirYes
classNameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations exist, so the description carries the full behavioral burden. It implies a read operation but says nothing about what happens on a missing class, whether output is the full method/field source, error behavior, or that smaliDir must come from a prior unpacking/decompile step.

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?

Two tight sentences, front-loaded with the action and then the className format detail. Nothing wasted, though it is extremely terse given the undocumented smaliDir parameter.

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 simple two-parameter read tool with no output schema the description is roughly adequate, but omitting any explanation of smaliDir and of failure behavior leaves gaps an agent would hit when 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 0%, so both parameters rely on the description. It usefully documents the className accepted formats (com.foo.Bar vs com/foo/Bar), adding meaning beyond the bare schema, but smaliDir is left completely unexplained.

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: reading the smali source of a given class. This is distinguishable from siblings like smali_list_classes and smali_search, though those alternatives are never named. Clear purpose, no explicit sibling differentiation.

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

Usage Guidelines2/5

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

No statement of when to use this tool versus smali_search, smali_list_classes, or any other sibling, and no prerequisites (e.g., that a dex_to_smali/static_unpack step must run first to produce smaliDir). Only the className format hint is provided.

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