Skip to main content
Glama
matthewdtowles

iwantmymtg-mcp

mark_notification_read

Mark a single notification as read by providing its unique ID.

Instructions

Mark a single notification as read. Requires IWMM_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The markNotificationReadTool object definition, containing the handler function that calls apiFetch to PATCH /api/v1/notifications/{id}/read, marking a single notification as read. Accepts a string 'id' parameter.
    export const markNotificationReadTool = {
      name: "mark_notification_read",
      description: "Mark a single notification as read. Requires IWMM_API_KEY.",
      inputSchema: z.object({ id: z.string() }),
      handler: ({ id }: { id: string }) =>
        apiFetch({ path: `/api/v1/notifications/${encodeURIComponent(id)}/read`, method: "PATCH", authenticated: true }),
    };
  • Input schema for mark_notification_read: requires a single string field 'id' validated by Zod.
    inputSchema: z.object({ id: z.string() }),
  • markNotificationReadTool is included in the exported 'tools' array, registering it as an available MCP tool.
      markNotificationReadTool,
      markAllNotificationsReadTool,
    ];
  • The apiFetch helper function used by the handler to make authenticated HTTP requests to the IWMM API.
    export async function apiFetch<T = unknown>(req: ApiRequest): Promise<T> {
      const url = new URL(req.path, config.baseUrl);
      if (req.query) {
        for (const [k, v] of Object.entries(req.query)) {
          if (v !== undefined && v !== null && v !== "") {
            url.searchParams.set(k, String(v));
          }
        }
      }
    
      const headers: Record<string, string> = {
        Accept: "application/json",
        "User-Agent": "iwantmymtg-mcp/0.0.1",
      };
    
      if (req.authenticated) {
        const { requireApiKey } = await import("./config.js");
        headers["Authorization"] = `Bearer ${requireApiKey()}`;
      }
    
      if (req.body !== undefined) {
        headers["Content-Type"] = "application/json";
      }
    
      const res = await fetch(url, {
        method: req.method ?? "GET",
        headers,
        body: req.body !== undefined ? JSON.stringify(req.body) : undefined,
      });
    
      if (!res.ok) {
        const text = await res.text();
        throw new ApiError(res.status, text, {
          limit: res.headers.get("X-RateLimit-Limit") ?? undefined,
          remaining: res.headers.get("X-RateLimit-Remaining") ?? undefined,
          reset: res.headers.get("X-RateLimit-Reset") ?? undefined,
        });
      }
    
      if (res.status === 204) return undefined as T;
      return (await res.json()) as T;
    }
Behavior2/5

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

No annotations provided. Description only notes API key requirement and marking as read, but fails to disclose if the operation is idempotent, reversible, or has side effects.

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

Conciseness3/5

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

Two short sentences with no fluff, but the brevity comes at the cost of missing important details.

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

Completeness1/5

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

Lacks output schema, annotations, and parameter descriptions. Does not cover error handling, return values, or behavioral constraints, making it insufficient for an agent to use correctly.

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

Parameters1/5

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

Schema description coverage is 0%, and the description does not explain the 'id' parameter (e.g., what it refers to, format, or source).

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 the tool marks a single notification as read. The verb 'Mark' and resource 'notification' are specific, and it distinguishes from sibling 'mark_all_notifications_read'.

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?

Mentions requirement of IWMM_API_KEY but lacks guidance on when to use this tool versus alternatives, such as 'mark_all_notifications_read'.

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/matthewdtowles/iwantmymtg-mcp'

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