mailosaur_analysis_spam
Run spam analysis on an email message to determine its spam score and classification.
Instructions
Run spam analysis for a message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messageId | Yes |
Implementation Reference
- src/index.ts:386-396 (registration)Registration of the 'mailosaur_analysis_spam' tool via server.tool() with a Zod schema requiring messageId (string) and a handler that calls mailosaur.analysis.spam(messageId).
server.tool( "mailosaur_analysis_spam", "Run spam analysis for a message.", { messageId: z.string() }, async ({ messageId }) => { const result = await mailosaur.analysis.spam(messageId); return response(result); } ); - src/index.ts:392-395 (handler)Handler function for the spam analysis tool. It calls mailosaur.analysis.spam(messageId) and returns the result via the response() helper.
async ({ messageId }) => { const result = await mailosaur.analysis.spam(messageId); return response(result); } - src/index.ts:389-391 (schema)Input schema for the tool, requiring a single 'messageId' string parameter.
{ messageId: z.string() }, - src/index.ts:79-88 (helper)The response() helper used to wrap the spam analysis result in MCP content format (JSON-stringified text content).
function response(value: unknown) { return { content: [ { type: "text" as const, text: JSON.stringify(value, null, 2) } ] }; }