import { defineTool } from "@phaseo/agent-sdk";
const fetchTicket = defineTool({
id: "fetch-ticket",
description: "Load one internal support ticket.",
parameters: {
type: "object",
properties: {
ticketId: { type: "string" },
},
required: ["ticketId"],
additionalProperties: false,
},
timeoutMs: 3_000,
async execute(input: { ticketId: string }, context) {
const response = await fetch(
`https://internal.example/tickets/${input.ticketId}`,
{ signal: context.signal },
);
return response.json();
},
});