Skip to main content
Glama
Sealjay

mcp-hey

hey_thread_mute

Idempotent

Mute or unmute a thread in Hey.com to stop or resume notifications. The thread stays in its current view; it is not moved or deleted.

Instructions

Mute or unmute a thread (called 'Ignore' in Hey.com's UI). Muting stops notifications for the thread but keeps it in its current view — the thread is not moved or deleted. Returns {success, error?}. Reversible by calling with the opposite action. To check if a thread is currently muted, use hey_read_email — the response includes a 'muted' field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
posting_idYesThe posting ID of the thread (use postingId from list operations)
actionYesmute to stop notifications, unmute to resume them

Implementation Reference

  • src/index.ts:991-1017 (registration)
    The 'hey_thread_mute' tool is registered in the tools array with its name, description, annotations, and inputSchema. It accepts posting_id (string) and action (enum: mute/unmute).
    {
      name: "hey_thread_mute",
      annotations: {
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
      description:
        "Mute or unmute a thread (called 'Ignore' in Hey.com's UI). Muting stops notifications for the thread but keeps it in its current view — the thread is not moved or deleted. Returns {success, error?}. Reversible by calling with the opposite action. To check if a thread is currently muted, use hey_read_email — the response includes a 'muted' field.",
      inputSchema: {
        type: "object" as const,
        properties: {
          posting_id: {
            type: "string",
            description:
              "The posting ID of the thread (use postingId from list operations)",
          },
          action: {
            type: "string",
            enum: ["mute", "unmute"],
            description: "mute to stop notifications, unmute to resume them",
          },
        },
        required: ["posting_id", "action"],
      },
    },
  • The switch-case handler for the 'hey_thread_mute' tool call. Validates posting_id and action, then delegates to ignoreThread() for mute action or unignoreThread() for unmute action.
    case "hey_thread_mute": {
      const postingId = validateId(args?.posting_id)
      const action = args?.action as string
      if (!postingId) {
        return {
          content: [
            {
              type: "text",
              text: "Error: posting_id is required and must be valid",
            },
          ],
          isError: true,
        }
      }
      if (!action || !["mute", "unmute"].includes(action)) {
        return {
          content: [
            {
              type: "text",
              text: "Error: action is required (mute or unmute)",
            },
          ],
          isError: true,
        }
      }
      result =
        action === "mute"
          ? await ignoreThread(postingId)
          : await unignoreThread(postingId)
      break
    }
  • The ignoreThread() function performs the mute operation by POSTing to /postings/{postingId}/muting, then invalidates the cache with action 'mute'.
    export async function ignoreThread(postingId: string): Promise<OrganiseResult> {
      if (!postingId) {
        return { success: false, error: "Posting ID is required" }
      }
    
      try {
        const response = await withCsrfRetry(() =>
          heyClient.post(`/postings/${postingId}/muting`),
        )
    
        return organiseResponseToResult(response, () =>
          invalidateForAction("mute", postingId),
        )
      } catch (err) {
        return { success: false, error: toUserError(err) }
      }
    }
  • The unignoreThread() function performs the unmute operation by DELETE-ing /postings/{postingId}/muting, then invalidates the cache with action 'unmute'.
    export async function unignoreThread(
      postingId: string,
    ): Promise<OrganiseResult> {
      if (!postingId) {
        return { success: false, error: "Posting ID is required" }
      }
    
      try {
        const response = await withCsrfRetry(() =>
          heyClient.delete(`/postings/${postingId}/muting`),
        )
    
        return organiseResponseToResult(response, () =>
          invalidateForAction("unmute", postingId),
        )
      } catch (err) {
        return { success: false, error: toUserError(err) }
      }
    }
  • The cache invalidation logic for 'mute' and 'unmute' actions. It invalidates the cached message for the given postingId (but not full folder syncs, as muting doesn't move the thread between folders).
    case "mute":
    case "unmute":
      // Muting/unmuting affects thread notifications but not folder membership
      if (messageId) {
        execute("UPDATE messages SET cached_at = 0 WHERE id = ?", [messageId])
      }
      break
  • The input schema for hey_thread_mute defines posting_id (string, required) and action (enum ['mute', 'unmute'], required). Also the muted field returned in readEmail result type.
        type: "object" as const,
        properties: {
          posting_id: {
            type: "string",
            description:
              "The posting ID of the thread (use postingId from list operations)",
          },
          action: {
            type: "string",
            enum: ["mute", "unmute"],
            description: "mute to stop notifications, unmute to resume them",
          },
        },
        required: ["posting_id", "action"],
      },
    },
  • Detection of muted/ignored thread status when reading an email, setting the muted boolean property on the response.
    // Detect muted/ignored thread status
    const muteNotice = root.querySelector(".island--topic-notice")
    const muted =
      muteNotice?.text?.includes("ignored") ||
      !!root.querySelector(".action-group__action--unmute")
    
    return {
      id,
      from,
      fromEmail,
      to: firstEntry?.to,
      cc: firstEntry?.cc,
      subject,
      body: fallbackBody || body,
      date,
      threadId,
      entries: entries.length > 0 ? entries : undefined,
      muted: muted || undefined,
    }
Behavior5/5

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

Discloses key behaviors: reversible, keeps thread in current view, returns {success, error?}. Aligns with annotations (idempotentHint true, destructiveHint false). No contradictions.

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

Conciseness5/5

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

Three concise sentences front-loading the core purpose, with no extraneous text. Every sentence adds value.

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?

Given the simple tool, annotations, and full schema coverage, the description fully satisfies the agent's needs. Mentions return format despite no output schema.

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?

Schema covers both parameters (100%). Description adds context for posting ID (use from list ops) and action enum values, going beyond schema descriptions.

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?

Clearly states 'Mute or unmute a thread' with the Hey.com term 'Ignore' for clarity. Distinguishes from siblings like hey_read_email (which checks mute status) and hey_move_to (which moves threads).

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?

Explains when to use (stop/resume notifications) and provides explicit guidance to check mute status via hey_read_email. Could add more on when not to use, but sufficient.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sealjay/mcp-hey'

If you have feedback or need assistance with the MCP directory API, please join our Discord server