Skip to main content
Glama
jhw7500

Email MCP Server

by jhw7500

search_emails

Search emails by keyword in subject and sender fields to find specific messages in your inbox. Set a limit to control results.

Instructions

키워드로 이메일을 검색합니다. 제목과 발신자에서 검색합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYes검색 키워드
limitNo검색 범위 최근 N건 (기본: 50)

Implementation Reference

  • The handler logic for the 'search_emails' tool, which validates inputs, fetches email headers, and filters them by keyword.
    case "search_emails": {
      if (!args.keyword || typeof args.keyword !== "string") {
        return { content: [{ type: "text" as const, text: "오류: keyword는 필수 문자열 파라미터입니다." }], isError: true };
      }
      const keyword = args.keyword.toLowerCase();
      const limit = Math.min((args.limit as number) || 50, 100);
      const headers = await withConnection(config, (client) => client.list(limit));
      const matched = headers.filter(
        (h) =>
          h.subject.toLowerCase().includes(keyword) ||
          h.from.toLowerCase().includes(keyword)
      );
      return {
        content: [
          {
            type: "text" as const,
            text: `"${args.keyword}" 검색 결과 (${matched.length}건):\n\n${formatEmailList(matched)}`,
          },
        ],
      };
    }
  • The schema definition for the 'search_emails' tool, specifying input arguments.
    {
      name: "search_emails",
      description: "키워드로 이메일을 검색합니다. 제목과 발신자에서 검색합니다.",
      inputSchema: {
        type: "object" as const,
        properties: {
          keyword: { type: "string", description: "검색 키워드" },
          limit: { type: "number", description: "검색 범위 최근 N건 (기본: 50)" },
        },
        required: ["keyword"],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the search scope (subject and sender) but doesn't disclose critical behaviors: whether it's read-only or mutating, authentication needs, rate limits, pagination, error handling, or return format. For a search tool with zero annotation coverage, this leaves significant gaps in understanding how it operates.

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?

The description is a single, efficient sentence in Korean that states the core function. It's appropriately sized for a simple search tool, with no wasted words. However, it could be slightly more structured by explicitly separating purpose from scope for better readability.

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

Completeness2/5

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

Given no annotations, no output schema, and a search operation that likely returns complex results, the description is incomplete. It doesn't explain what the tool returns (e.g., email IDs, summaries, full content), how results are ordered, or error conditions. For a tool with 2 parameters and potential behavioral complexity, more context is needed to guide effective use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents both parameters. The description adds no parameter-specific information beyond implying keyword usage for subject/sender search. It doesn't explain keyword matching (exact, partial, case-sensitive), limit behavior beyond the schema's default, or other semantic details. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'search emails by keyword' with specific scope 'in subject and sender'. It distinguishes from siblings like 'fetch_recent_emails' or 'list_emails' by specifying keyword-based search. However, it doesn't explicitly contrast with 'fetch_email_thread' or other search-related tools, keeping it from a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer this over 'fetch_recent_emails' for recent emails, 'list_emails' for unfiltered listing, or 'fetch_email_thread' for thread-based retrieval. No prerequisites, exclusions, or comparative context is given.

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/jhw7500/email-mcp-server'

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