/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { retrospectivesUpdateIncidentRetrospectiveField } from "../../funcs/retrospectivesUpdateIncidentRetrospectiveField.js";
import { UpdateIncidentRetrospectiveFieldRequest$zodSchema } from "../../models/updateincidentretrospectivefieldop.js";
import { formatResult, ToolDefinition } from "../tools.js";
const args = {
request: UpdateIncidentRetrospectiveFieldRequest$zodSchema,
};
export const tool$retrospectivesUpdateIncidentRetrospectiveField:
ToolDefinition<typeof args> = {
name: "update-retrospective-field",
description:
`Updates a field in a retrospective (RCA) for an incident. Among other things, this is useful for:
- Updating a field in a retrospective,
- Updating the value of a field in a retrospective.
The value should be unstyled HTML.
`,
scopes: ["read", "write"],
annotations: {
"title": "",
"destructiveHint": false,
"idempotentHint": false,
"openWorldHint": false,
"readOnlyHint": false,
},
args,
tool: async (client, args, ctx) => {
const [result, apiCall] =
await retrospectivesUpdateIncidentRetrospectiveField(
client,
args.request,
{ fetchOptions: { signal: ctx.signal } },
).$inspect();
if (!result.ok) {
return {
content: [{ type: "text", text: result.error.message }],
isError: true,
};
}
const value = result.value;
return formatResult(value, apiCall);
},
};