Skip to main content
Glama

call_function

Invoke an exported function from an ES Module on a connected Android or iOS device to observe or control the app, returning the result or error.

Instructions

On the connection instance identified by deviceId and appId, load or reuse a probe ES Module, call one export, and return its result or error with action-scoped evidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoPositional arguments passed to the exported function.
appIdYesAndroid package name or iOS bundle identifier.
deviceIdYesCanonical ADB serial, CoreDevice identifier, or simulator UDID.
filePathYesAbsolute path to a UTF-8 standard ES Module file readable by the MCP server.
functionNameYesName of the function exported by the ES Module.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
resultNo
evidenceYesEvidence JSON files, ordered by the first record for each action.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3.3/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 discloses that the tool loads or reuses a module, invokes a single export, and returns either a result or an error with action-scoped evidence. However, it does not mention potential side effects of executing code, permissions required, or failure conditions beyond returning an error.

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 a single sentence with no filler, front-loads the main action, and packs the key semantics—connection scope, module loading, single export call, and result/error return—into a compact definition.

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?

The description covers the core action and return behavior, and an output schema is presenthips. However, for a tool that executes exported functions, it lacks important context like safety warnings, side-effect expectations, or prerequisites for the probe module, and it does not guide selection among siblings.

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 schema documents all five parameters. The description adds the notion of loading/reusing a probe ES Module and calling one export, which clarifies filePath and functionName, but it does not provide substantial additional meaning beyond the parameter descriptions.

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?

The description uses specific verbs ('load or reuse', 'call', 'return') and identifies the target resource: a probe ES Module on a connection instance identified by deviceId and appId. It clearly conveys what the tool does, though it does not explicitly contrast itself with sibling tools like eval_script.

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?

The description explains the action but gives no guidance on when this tool should be preferred over alternatives such as eval_script, connect, or disconnect. There are no use-case conditions, prerequisites, or exclusions, leaving the agent to infer selection criteria.

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

Install Server

Other Tools