diff --git a/src/agents/tools/message-tool.test.ts b/src/agents/tools/message-tool.test.ts index 72f207c1de28..71f457ce427a 100644 --- a/src/agents/tools/message-tool.test.ts +++ b/src/agents/tools/message-tool.test.ts @@ -240,7 +240,7 @@ function getActionEnum(properties: Record) { function expectStringSchema( schema: unknown, expected?: { - descriptionIncludes?: string; + description?: string; }, ) { expect(schema).toBeTruthy(); @@ -249,8 +249,8 @@ function expectStringSchema( } const record = schema as Record; expect(record.type).toBe("string"); - if (expected?.descriptionIncludes) { - expect(record.description).toEqual(expect.stringContaining(expected.descriptionIncludes)); + if (expected?.description) { + expect(record.description).toBe(expected.description); } } @@ -1065,7 +1065,10 @@ describe("message tool schema scoping", () => { const properties = getToolProperties(tool); expect(getActionEnum(properties)).toContain("read"); - expectStringSchema(properties.messageId, { descriptionIncludes: "read" }); + expectStringSchema(properties.messageId, { + description: + "Target message id for read, reaction, edit, delete, pin, or unpin. If omitted for reaction-like actions, defaults to the current inbound message id when available.", + }); }); });