fix(assistant): inline email tools so list_inbox/search_email actually work#11
Merged
Conversation
…ually work - The assistant declared 5 email tools but execTool() only handled filesystem tools, so any list_inbox/search_email/read_email/send_email/reply_email call returned 'Unknown tool: ...' and the model fell back to the generic 'I had trouble generating a response' error - Ported the Microsoft Graph tools from local-tool-server into miniapps/assistant directly (shares the existing MSAL token cache at C:\mcp-servers\outlook-email) - Added @azure/msal-node dependency and tests covering happy path, HTML decoding, error surfacing, and required-arg validation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
list_inbox/search_email/read_email/send_email/reply_emailcall returnedUnknown tool: ...and the model fell back to the generic "I had trouble generating a response" error.local-tool-server/server.jsdirectly intominiapps/assistantso they share the existing MSAL token cache. No second process / second secret needed.@azure/msal-nodeand unit tests covering happy path, HTML body decoding, Graph error surfacing, and required-arg validation.Test plan
pnpm installpnpm turbo run test(25/25 pass — 18 existing + 7 new)pnpm turbo run build --filter=@mysuperapp/web(clean)next start, then ask the assistantSearch my email for any Ride1Up Portola discount— expect a real summary, not the generic error