queryRobotParam
Upload files to the YingDao RPA MCP Server using the queryRobotParam tool to enable automated execution of repetitive tasks through AI interactions.
Instructions
该接口用于上传文件到RPA平台。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| robotUuid | No | schema.local.queryRobotParam.robotUuid |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"robotUuid": {
"description": "schema.local.queryRobotParam.robotUuid",
"type": "string"
}
},
"type": "object"
}
Implementation Reference
- src/yingdao/localService.ts:20-31 (handler)Handler implementation for queryRobotParam in local mode: attempts to read and parse parameters from 'main.flow.json' file.async queryRobotParam(robotUuid?: string): Promise<any> { const mainFlowJsonPath=path.join(this.appsPath, 'xbot_robot','.dev','main.flow.json'); if (!existsSync(mainFlowJsonPath)) { const mainFlow = JSON.parse(readFileSync(mainFlowJsonPath, 'utf8')); if (mainFlow.parameters) { return mainFlow.parameters; } else { return []; } } return []; }
- src/yingdao/openApiService.ts:44-57 (handler)Handler implementation for queryRobotParam in openAPI mode: sends POST request to Yingdao API endpoint '/robot/v2/queryRobotParam'.async queryRobotParam(params: { robotUuid?: string; accurateRobotName?: string; }): Promise<RobotParamResponse> { try { const response = await this.client.post('/robot/v2/queryRobotParam', params); console.log("response",response.data); return response.data.code === 200 ? response.data.data : response.data.msg ; } catch (error: any) { throw new Error(`Failed to fetch robot parameters: ${error.message}`); } }
- src/baseServer.ts:58-65 (registration)Registration of 'queryRobotParam' tool in local mode, wrapping localService.queryRobotParam.this.server.tool('queryRobotParam', i18n.t('tool.uploadFile.description'), queryRobotParamSchema, async ({ robotUuid }) => { try { const result = await this.localService?.queryRobotParam(robotUuid); return { content: [{ type: 'text', text: JSON.stringify(result) }]}; } catch (error) { throw new Error(i18n.t('tool.uploadFile.error')); } });
- src/baseServer.ts:77-87 (registration)Registration of 'queryRobotParam' tool in openAPI mode, wrapping openApiService.queryRobotParam.this.server.tool('queryRobotParam', i18n.t('tool.queryRobotParam.description'), robotParamSchema, async ({ robotUuid, accurateRobotName }) => { try { const result = await this.openApiService?.queryRobotParam({ robotUuid, accurateRobotName }); return { content: [{ type: 'text', text: JSON.stringify(result) }]}; } catch (error) { throw new Error(i18n.t('tool.queryRobotParam.error')); } });
- src/schema/openApi.ts:39-42 (schema)Input schema for queryRobotParam in openAPI mode (robotParamSchema), includes robotUuid and accurateRobotName.export const robotParamSchema = { robotUuid: z.string().optional().describe(i18n.t('schema.robotParam.robotUuid')), accurateRobotName: z.string().optional().describe(i18n.t('schema.robotParam.accurateRobotName')) } as const;