dynamics_toggle_plugin_step
Activate or deactivate a plugin step in Microsoft Dynamics CRM by specifying the step ID and desired state to control workflow execution.
Instructions
Ativa ou desativa um step de plugin
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"stepId": "<stepId>",
"enabled": "<enabled>"
},
"name": "dynamics_toggle_plugin_step"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stepId | Yes | ID do step do plugin | |
| enabled | Yes | true para ativar, false para desativar |
Implementation Reference
- src/tools/plugins/index.ts:236-253 (handler)The implementation of the 'dynamics_toggle_plugin_step' tool, which updates the statecode and statuscode of a plugin step in Dynamics.
server.tool( "dynamics_toggle_plugin_step", "Ativa ou desativa um step de plugin", EnableDisablePluginStepSchema.shape, async (params: z.infer<typeof EnableDisablePluginStepSchema>) => { await client.update("sdkmessageprocessingsteps", params.stepId, { statecode: params.enabled ? 0 : 1, statuscode: params.enabled ? 1 : 2, }); return { content: [ { type: "text" as const, text: `Step ${params.stepId} ${params.enabled ? "ativado" : "desativado"} com sucesso!`, }, ], }; - src/tools/plugins/index.ts:46-49 (schema)The input schema definition for the 'dynamics_toggle_plugin_step' tool.
export const EnableDisablePluginStepSchema = z.object({ stepId: z.string().describe("ID do step do plugin"), enabled: z.boolean().describe("true para ativar, false para desativar"), });