current_app
Retrieves the package name and page name of the current foreground application on a HarmonyOS device.
Instructions
Get the current foreground application information.
Returns: Tuple[str, str]: A tuple contain the package_name andpage_name of the foreground application. If no foreground application is found, returns (None, None).
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": "current_app"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |