Skip to main content
Glama

Detect email provider

detect_email_provider
Read-onlyIdempotent

Inspect a customer's email domain via Microsoft's public getuserrealm.srf endpoint to figure out whether their Microsoft 365 is bought direct from Microsoft or resold through GoDaddy. Use this IMMEDIATELY after the customer gives you their email domain in a migration conversation, BEFORE asking "is it Microsoft Direct or GoDaddy?" — the answer should come from this tool, not from the customer.

Returns { likelyProvider: "microsoft-direct" | "godaddy", confidence: "high" | "medium" | "low", ... }. Pass likelyProvider straight to Start email migration (in the Squish dashboard) as the source argument. You do NOT need to mention the detection step to the customer — just proceed. The source field only affects post-migration UX (which URL we point the customer to for cancelling their old subscription), so a wrong guess is easily corrected mid-flow. NEVER respond to a "you tell me?" question with "I can't tell" — call this tool instead.

Idempotent + side-effect-free (just an outbound HTTP GET to login.microsoftonline.com); safe to call multiple times.

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": {
      "domain": "<domain>"
    },
    "name": "detect_email_provider"
  }
}

Input Schema

NameRequiredDescriptionDefault
domainYesThe customer's email domain (e.g. "acme.com").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, but the description adds real context beyond them: the outbound HTTP GET target, repeat-call safety, and the consequence model (a wrong provider guess only affects post-migration cancellation UX and is easily corrected mid-flow). It stops short of describing rate limits or failure/error behavior, so it is strong rather than complete.

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?

Front-loaded with purpose and timing, then return shape, then behavioral notes. It is longer than most definitions but nearly every sentence changes agent behavior; the 'you do NOT need to mention the detection step' line borders on redundant with the preceding advice but is defensible.

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

Completeness5/5

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

No output schema exists, yet the description documents the return shape (likelyProvider enum values, confidence levels) and how to consume the result downstream. For a single-parameter lookup tool, nothing an agent needs to call and use it correctly is missing.

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

Parameters4/5

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

Only one parameter with 100% schema coverage, so the schema already carries the syntax. The description still adds meaning by framing the domain as the one the customer just supplied in a migration conversation, which clarifies the expected source of the value rather than just its format.

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 (inspect) plus resource (customer's email domain) and the exact mechanism (getuserrealm.srf), and names the decision it resolves (Microsoft Direct vs GoDaddy). This clearly distinguishes it from siblings like check_email_auth, lookup_dns, and detect_web_host.

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

Usage Guidelines5/5

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

Gives explicit timing ('IMMEDIATELY after the customer gives you their email domain'), an explicit when-not ('BEFORE asking is it Microsoft Direct or GoDaddy?'), and a follow-on path (pass likelyProvider to Start email migration as source). It even pre-empts a failure mode: never answer a 'you tell me?' question with 'I can't tell'.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources