Update Experiment
Update mutable fields of an experiment.
Use this tool when the caller wants to rename an experiment or replace its description without changing the experiment identity. The request must include at least one mutable field, and names must remain unique within the authenticated user scope.
When to Use:
- Call this to rename an experiment or replace its description while keeping the same experiment identity.
- Call this after retrieving the experiment when the user wants to refine the stored metadata.
Constraints:
- Only
nameanddescriptionare mutable through this route. - Names must remain unique within the authenticated user scope.
Notes:
- For agent-facing output, explicitly confirm which fields changed and
include the resulting
idandname. - The endpoint returns the updated
ContextExperimentModelrather than a status-only wrapper.
Args:
experiment_id: Opaque experiment identifier to update.
user: Authenticated user resolved from the API key.
data: Update payload containing name and/or description.
db: Active database session.
Returns: The updated experiment object.
Raises:
HTTPException: Raised with 404 when the experiment is not available
to the caller, or 409 when the requested new name already
exists in the same user scope.
Authorizations
Path Parameters
Body
Define payload for MCP experiment update requests.
Attributes: name: New experiment name. description: New HTML-formatted experiment description.
Response
Successful Response
Represent an experiment with MCP-specific context metadata.
description and creation_date remain optional for compatibility
with legacy database rows.
Attributes:
description: Plain-text experiment description. Optional for legacy
rows that still store NULL.
creation_date: Experiment creation timestamp. Optional for legacy rows
that still store NULL.
context: Additional plain-text guidance for AI agents consuming the
experiment.
url: Dashboard URL for the experiment when available.