Skip to main content
Glama

Get Email Code

get_email_code
Read-only

Reads the verification code (OTP/2FA) from an email in your inbox; optional message_id selects a message. list_email_messages inspects messages. Takes inbox_id, capability and access_token from create_email_inbox. No extra charge. Polling interval: at least 2s; 429 or 503 means wait. Pending/no_code/ambiguous is not a usable code; external acceptance is not guaranteed.

Input Schema

NameRequiredDescriptionDefault
inbox_idYes
capabilityYes
message_idNo
access_tokenNoUse the scoped access_token returned by create_email_inbox. Optional only for an existing provisioned private pilot connection.

Output Schema

NameRequiredDescriptionDefault
codeNo
statusNo
provenanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedOutput schema / $defs
      Removed value: -{
      -  "Provenance": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "expires_at": {
      -        "title": "Expires At",
      -        "type": "integer"
      -      },
      -      "extraction": {
      -        "const": "numeric_context_v1",
      -        "default": "numeric_context_v1",
      -        "title": "Extraction",
      -        "type": "string"
      -      },
      -      "message_id": {
      -        "title": "Message Id",
      -        "type": "string"
      -      },
      -      "received_at": {
      -        "title": "Received At",
      -        "type": "integer"
      -      },
      -      "sender_verified": {
      -        "const": false,
      -        "default": false,
      -        "title": "Sender Verified",
      -        "type": "boolean"
      -      },
      -      "source": {
      -        "const": "signed_relay",
      -        "default": "signed_relay",
      -        "title": "Source",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "message_id",
      -      "received_at",
      -      "expires_at"
      -    ],
      -    "title": "Provenance",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / anyOf
      Removed value: -[
      -  {
      -    "$defs": {
      -      "Provenance": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "expires_at": {
      -            "title": "Expires At",
      -            "type": "integer"
      -          },
      -          "extraction": {
      -            "const": "numeric_context_v1",
      -            "default": "numeric_context_v1",
      -            "title": "Extraction",
      -            "type": "string"
      -          },
      -          "message_id": {
      -            "title": "Message Id",
      -            "type": "string"
      -          },
      -          "received_at": {
      -            "title": "Received At",
      -            "type": "integer"
      -          },
      -          "sender_verified": {
      -            "const": false,
      -            "default": false,
      -            "title": "Sender Verified",
      -            "type": "boolean"
      -          },
      -          "source": {
      -            "const": "signed_relay",
      -            "default": "signed_relay",
      -            "title": "Source",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "message_id",
      -          "received_at",
      -          "expires_at"
      -        ],
      -        "title": "Provenance",
      -        "type": "object"
      -      }
      -    },
      -    "additionalProperties": false,
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Code"
      -      },
      -      "provenance": {
      -        "items": {
      -          "$ref": "#/$defs/Provenance"
      -        },
      -        "title": "Provenance",
      -        "type": "array"
      -      },
      -      "status": {
      -        "enum": [
      -          "pending",
      -          "code",
      -          "no_code",
      -          "ambiguous"
      -        ],
      -        "title": "Status",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "title": "Code",
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "code": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "status": {
      -        "maximum": 599,
      -        "minimum": 400,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "code"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedOutput schema / description
      Added value: +"Fields only; full schema in GET /v1/catalog."
    • addedOutput schema / properties
      Added value: +{
      +  "code": {},
      +  "provenance": {},
      +  "status": {}
      +}
  2. Changed4 schema fields changed
    • addedOutput schema / $defs
      Added value: +{
      +  "Provenance": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "expires_at": {
      +        "title": "Expires At",
      +        "type": "integer"
      +      },
      +      "extraction": {
      +        "const": "numeric_context_v1",
      +        "default": "numeric_context_v1",
      +        "title": "Extraction",
      +        "type": "string"
      +      },
      +      "message_id": {
      +        "title": "Message Id",
      +        "type": "string"
      +      },
      +      "received_at": {
      +        "title": "Received At",
      +        "type": "integer"
      +      },
      +      "sender_verified": {
      +        "const": false,
      +        "default": false,
      +        "title": "Sender Verified",
      +        "type": "boolean"
      +      },
      +      "source": {
      +        "const": "signed_relay",
      +        "default": "signed_relay",
      +        "title": "Source",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "message_id",
      +      "received_at",
      +      "expires_at"
      +    ],
      +    "title": "Provenance",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "$defs": {
      +      "Provenance": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "expires_at": {
      +            "title": "Expires At",
      +            "type": "integer"
      +          },
      +          "extraction": {
      +            "const": "numeric_context_v1",
      +            "default": "numeric_context_v1",
      +            "title": "Extraction",
      +            "type": "string"
      +          },
      +          "message_id": {
      +            "title": "Message Id",
      +            "type": "string"
      +          },
      +          "received_at": {
      +            "title": "Received At",
      +            "type": "integer"
      +          },
      +          "sender_verified": {
      +            "const": false,
      +            "default": false,
      +            "title": "Sender Verified",
      +            "type": "boolean"
      +          },
      +          "source": {
      +            "const": "signed_relay",
      +            "default": "signed_relay",
      +            "title": "Source",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "message_id",
      +          "received_at",
      +          "expires_at"
      +        ],
      +        "title": "Provenance",
      +        "type": "object"
      +      }
      +    },
      +    "additionalProperties": false,
      +    "properties": {
      +      "code": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "title": "Code"
      +      },
      +      "provenance": {
      +        "items": {
      +          "$ref": "#/$defs/Provenance"
      +        },
      +        "title": "Provenance",
      +        "type": "array"
      +      },
      +      "status": {
      +        "enum": [
      +          "pending",
      +          "code",
      +          "no_code",
      +          "ambiguous"
      +        ],
      +        "title": "Status",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "status"
      +    ],
      +    "title": "Code",
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "properties": {
      +      "code": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "status": {
      +        "maximum": 599,
      +        "minimum": 400,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "status",
      +      "code"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedOutput schema / description
      Removed value: -"Fields only; full schema in GET /v1/catalog."
    • removedOutput schema / properties
      Removed value: -{
      -  "code": {},
      -  "provenance": {},
      -  "status": {}
      -}
  3. Changed4 schema fields changed
    • removedOutput schema / $defs
      Removed value: -{
      -  "Provenance": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "expires_at": {
      -        "title": "Expires At",
      -        "type": "integer"
      -      },
      -      "extraction": {
      -        "const": "numeric_context_v1",
      -        "default": "numeric_context_v1",
      -        "title": "Extraction",
      -        "type": "string"
      -      },
      -      "message_id": {
      -        "title": "Message Id",
      -        "type": "string"
      -      },
      -      "received_at": {
      -        "title": "Received At",
      -        "type": "integer"
      -      },
      -      "sender_verified": {
      -        "const": false,
      -        "default": false,
      -        "title": "Sender Verified",
      -        "type": "boolean"
      -      },
      -      "source": {
      -        "const": "signed_relay",
      -        "default": "signed_relay",
      -        "title": "Source",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "message_id",
      -      "received_at",
      -      "expires_at"
      -    ],
      -    "title": "Provenance",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / anyOf
      Removed value: -[
      -  {
      -    "$defs": {
      -      "Provenance": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "expires_at": {
      -            "title": "Expires At",
      -            "type": "integer"
      -          },
      -          "extraction": {
      -            "const": "numeric_context_v1",
      -            "default": "numeric_context_v1",
      -            "title": "Extraction",
      -            "type": "string"
      -          },
      -          "message_id": {
      -            "title": "Message Id",
      -            "type": "string"
      -          },
      -          "received_at": {
      -            "title": "Received At",
      -            "type": "integer"
      -          },
      -          "sender_verified": {
      -            "const": false,
      -            "default": false,
      -            "title": "Sender Verified",
      -            "type": "boolean"
      -          },
      -          "source": {
      -            "const": "signed_relay",
      -            "default": "signed_relay",
      -            "title": "Source",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "message_id",
      -          "received_at",
      -          "expires_at"
      -        ],
      -        "title": "Provenance",
      -        "type": "object"
      -      }
      -    },
      -    "additionalProperties": false,
      -    "properties": {
      -      "code": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "title": "Code"
      -      },
      -      "provenance": {
      -        "items": {
      -          "$ref": "#/$defs/Provenance"
      -        },
      -        "title": "Provenance",
      -        "type": "array"
      -      },
      -      "status": {
      -        "enum": [
      -          "pending",
      -          "code",
      -          "no_code",
      -          "ambiguous"
      -        ],
      -        "title": "Status",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "status"
      -    ],
      -    "title": "Code",
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "code": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "status": {
      -        "maximum": 599,
      -        "minimum": 400,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "status",
      -      "code"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedOutput schema / description
      Added value: +"Fields only; full schema in GET /v1/catalog."
    • addedOutput schema / properties
      Added value: +{
      +  "code": {},
      +  "provenance": {},
      +  "status": {}
      +}
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/non-destructive annotations: states the minimum polling interval of 2s, that 429/503 means back off, that there is no extra charge, and that pending/no_code/ambiguous results are not usable codes. The caveat that external acceptance is not guaranteed is real behavioral context an agent cannot get from structured fields.

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-loads the purpose, then packs operational constraints into short clauses; no filler sentences. The semicolon-chained style is dense but each clause carries information the agent needs.

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?

An output schema exists, so return-value explanation is unnecessary; the description instead covers the harder parts — credential origin, polling cadence, error/backoff signals, and unsuccessful outcome states. Nothing needed to call it correctly appears to be 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?

With only 25% schema description coverage, the description compensates by explaining where inbox_id, capability and access_token come from (create_email_inbox) and what message_id does. It still doesn't explain the format/scope of capability versus access_token, leaving a small gap.

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?

Opens with a specific verb and resource: reads the verification code (OTP/2FA) from an inbox email. It immediately distinguishes itself from the sibling list_email_messages by naming that tool as the inspector rather than the extractor.

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

Usage Guidelines4/5

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

Explicitly routes the agent: use list_email_messages to inspect messages, and this tool to pull the code, with message_id as an optional selector. It also states the prerequisite source for credentials (create_email_inbox). Lacks an explicit 'do not use if...' exclusion, so not quite a 5.

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