Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exercises/02.elicitation/01.problem/src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ export async function initializeTools(agent: EpicMeMCP) {
const existingTag = await agent.db.getTag(id)
invariant(existingTag, `Tag ID "${id}" not found`)

// 🐨 first check whether the client has the elicitInput capability, if it does then:
// 🐨 first check whether the client has the elicitation capability, if it does then:
// 🐨 Use agent.server.server.elicitInput to ask the user to confirm deletion of the tag.
// - The message should be: `Are you sure you want to delete tag "${existingTag.name}" (ID: ${id})?`
// - The requestedSchema should be an object with a boolean property "confirmed".
// 🐨 If the user does not confirm, return structuredContent with success: false and the tag.
// - Also return content with a text block saying "Tag deletion cancelled", the tag resource link, and the structuredContent.
// - Also return content with a text block saying `Deleting tag "${existingTag.name}" (ID: ${id}) rejected by the user.`, the tag resource link, and the structuredContent.

await agent.db.deleteTag(id)
const structuredContent = { success: true, tag: existingTag }
Expand Down
Loading