Skip to main content
Glama

send_report_email

Validate recipients, attachments, and external-send rules, then deliver a Power BI report bundle by email via Microsoft Graph or SMTP.

Instructions

Validate recipients/attachments and send a report bundle via Graph or SMTP.

Args: recipients_to: Primary recipient email addresses (logged redacted as SHA-256 hashes). subject: Email subject line. body_markdown: Email body content (markdown/plain text). recipients_cc: Optional CC recipient email addresses. attachment_paths: Optional attachment paths inside PBI_WORKSPACE_ROOT. audience_profile: Target audience profile ("internal_ops", "internal_admin", "external_client"). report_cadence: Report cadence ("daily", "weekly", "monthly"). confirm_external_send: Explicit confirmation required before external client sends. transport: Delivery transport ("auto", "graph", "smtp"). sender_address: Sender address / UPN override. dry_run: Validate domains, external gate, and attachment sizes without sending (default True). max_attachment_bytes: Maximum allowed total attachment size in bytes. graph_client: Optional injected Graph client for testing. smtp_sender: Optional injected SMTP callable for testing.

Returns: Dict with delivery status, transport used, redacted recipient hashes, and block reasons.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "recipients_to": "<recipients_to>",
      "subject": "<subject>",
      "body_markdown": "<body_markdown>"
    },
    "name": "send_report_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNo
subjectYes
transportNoauto
smtp_senderNo
graph_clientNo
body_markdownYes
recipients_ccNo
recipients_toYes
report_cadenceNodaily
sender_addressNo
attachment_pathsNo
audience_profileNointernal_ops
max_attachment_bytesNo
confirm_external_sendNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.25.1

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does substantial work: it discloses that recipients are logged redacted as SHA-256 hashes, that dry_run validates domains/external gate/attachment sizes without sending, that attachments are confined to PBI_WORKSPACE_ROOT, that an external send requires explicit confirmation, and that the return includes block reasons. Gaps remain around credential/auth requirements and what 'auto' transport actually resolves to, and no rate-limit or partial-failure behavior is given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in a single sentence, followed by a scannable Args block and a short Returns note. The length is justified by 14 parameters, though some entries restate the field name ('subject: Email subject line') without adding information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter mutation tool with no annotations, the definition covers the safety-critical surface: validation mode, external confirmation gate, path sandbox, size limit, redaction, and return contents. Remaining gaps are the semantics of transport='auto' fallback and any authentication prerequisites, which matter for an email-sending tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it documents all 14 parameters with meaning beyond the titles: SHA-256 redaction for recipients, the PBI_WORKSPACE_ROOT sandbox for attachment paths, the three audience_profile values, the confirm_external_send gate, the non-sending semantics of dry_run, and the testing-only nature of graph_client/smtp_sender. This is close to the strongest possible compensation for an undocumented schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair ('Validate recipients/attachments and send') plus a concrete resource ('report bundle') and the delivery mechanisms (Graph or SMTP). No sibling tool in the list performs email delivery, so an agent can identify this unambiguously from the first sentence alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: dry_run defaults to True and confirm_external_send is described as 'Explicit confirmation required before external client sends,' which signals a validate-then-send workflow and an external gate. However, the description never says when to choose this over export_kpi_report_bundle or other report tools, and gives no explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.