runApp
Execute RPA applications using the YingDao RPA MCP Server by specifying the appUuid and optional parameters to automate repetitive tasks efficiently.
Instructions
该接口用于运行RPA应用。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appParams | No | schema.local.executeRpaApp.appParams | |
| appUuid | Yes | schema.local.executeRpaApp.appUuid |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"appParams": {
"description": "schema.local.executeRpaApp.appParams"
},
"appUuid": {
"description": "schema.local.executeRpaApp.appUuid",
"type": "string"
}
},
"required": [
"appUuid"
],
"type": "object"
}
Implementation Reference
- src/baseServer.ts:50-57 (registration)Registers the 'runApp' MCP tool with description, input schema, and an inline async handler that delegates to LocalService.executeRpaApp and formats the response.this.server.tool('runApp', i18n.t('tool.runApp.description'), executeRpaAppSchema, async ({ appUuid, appParams }) => { try { const result = await this.localService?.executeRpaApp(appUuid, appParams); return { content: [{ type: 'text', text: JSON.stringify(result) }]}; } catch (error) { throw new Error(i18n.t('tool.runApp.error')); } });
- src/schema/local.ts:5-8 (schema)Defines the Zod input schema for the runApp tool: appUuid (required string) and appParams (any).export const executeRpaAppSchema = { appUuid: z.string().describe(i18n.t('schema.local.executeRpaApp.appUuid')), appParams: z.any().describe(i18n.t('schema.local.executeRpaApp.appParams')) } as const;
- src/yingdao/localService.ts:14-18 (handler)Implements the core logic of running the RPA app by constructing an argv string with the appUuid and spawning the shadowbot process (note: appParams is unused).async executeRpaApp(appUuid: string, appParams: any) { let argv = `shadowbot:Run?robot-uuid=${appUuid}`; spawn(this.shadowbotPath, [argv]); return 'success'; }