Update Agent JSON

The update_agent_json tool changes an Agent definition (JSON) according to a change that you describe. The tool does not create or change anything on your Pricefx partition. To create the Agent on your partition, use the Deploy Agent tool.

Tool Name – update_agent_json

Title – Update Agent JSON

Type – Private

Access Profile – Operator

Permissions

The update_agent_json tool reads the Agent configuration and the Datamart definitions of your Pricefx partition. The tool does not create or change anything on the partition. The tool is available to the Operator access profile, so every user on a private connection can use it. The tool is available only when the agent generator is set up on the MCP server.

Parameters

Parameter

Required

Description

agent

Yes

Agent definition to change. Use the definition that the Generate Agent JSON tool or a previous Update Agent JSON call returned, without changes.

update_request

Yes

Change to make, in business terms. Describe only the change, not the whole Agent, for example Raise the threshold to 10% and limit it to the EMEA region.

additional_datamart_unique_names

No

Technical names of Datamarts that the change newly needs. The tool detects the Datamarts that the Agent already uses, so use this parameter only when the change adds data from another Datamart.

Output

Field

Description

agent

Changed Agent definition. Pass it to the Update Agent JSON or Deploy Agent tool without changes.

datamarts_used

Technical names of the Datamarts that the changed Agent reads from. The list can be shorter than before when the change removes a Datamart.

explanation

Notes from the generator about what it changed. Can be empty.

Behavior and Limitations

  • The tool applies one change request per call. To make several changes, call the tool again with the latest Agent definition each time.

  • The tool detects the Datamarts that the Agent uses from the Agent definition. If the Agent uses no Datamart, the tool uses the Datamart set in the partition's Agent configuration.

  • An update usually takes 30 – 90 seconds, because the generator uses an AI model.

  • If the update times out, do not try again right away. The update most likely completed on the server, and a new attempt starts a second update with a different result. Keep using the Agent definition from before the update.

  • The changed definition is not saved anywhere. If you start a new conversation, the definition is lost.

Errors

Situation

Error Message

agent is not a valid Agent definition

The 'agent' payload is not a valid agent definition. Pass back the 'agent' object from generate_agent_json unmodified. Details: …

A name in additional_datamart_unique_names, or a Datamart the Agent uses, is not on the partition

Unknown datamart uniqueName(s): [...]. Available datamarts: [...]

The generator rejects the change because the result is not valid

The update could not be applied due to validation errors: followed by the errors and the generator's explanation

The generator cannot apply the change

Could not update the agent: followed by the error and the generator's explanation

The update takes longer than your AI client waits

A timeout error from your AI client

See Also