Skip to main content
Glama
Amazon EMR Log Analysis MCP Server

Amazon EMR Log Analysis MCP Server

by aws-samples

Analyze Emr Logs

analyze_emr_logs

Analyze EMR logs against a curated knowledge base to identify known issues and receive remediation recommendations.

Instructions

Analyze EMR logs for known issues and recommendations.

This tool performs searchs against a comprehensive knowledge base of curated EMR issues across multiple big data frameworks. It's useful for quick analysis of directly provided EMR logs.

Usage Examples

  • Analyze Spark driver logs for OutOfMemoryError issues

  • Check YARN logs for container killed errors

  • Identify common Hadoop HDFS issues in namenode logs

Response Format

The response includes matched issues with:

  • Issue summary and detailed description

  • Matched patterns found in the logs

  • Confidence score for each match

  • Links to AWS Knowledge Center articles when available

  • Recommendations for remediation steps

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": {
      "log_content": "<log_content>"
    },
    "name": "analyze_emr_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
log_contentYesEMR log content to analyze for known issues. Provide raw log text from EMR cluster components (Spark, YARN, Hadoop, etc.). The tool will search for patterns matching curated EMR issues and recommendations.

Output Schema

NameRequiredDescriptionDefault
summaryYesSummary of the analysis results
total_matchesYesTotal number of matched issues
matched_issuesNoIssues matched in the log content

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full load and does reasonably well: it discloses that the tool performs pattern searches against a curated knowledge base, that matches carry confidence scores, and that AWS Knowledge Center links and remediation recommendations may be returned. It does not explicitly state that no cluster connection or mutation occurs, and says nothing about rate limits or log-size limits, which keeps it from a 5.

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 purpose sentence followed by clearly headed sections for usage examples and response format, with no filler paragraphs. A typo ('searchs') and a slightly redundant response-format block (an output schema already exists) are the only blemishes.

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

Completeness4/5

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

For a one-parameter read/analysis tool with a full output schema, the description covers purpose, sample inputs, and matched-issue output shape. It omits operational context an agent might want, such as whether the tool requires credentials or how much log text is practical, but nothing essential to correct invocation is missing.

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?

There is a single parameter with 100% schema description coverage, so the schema already explains that raw EMR log text from Spark/YARN/Hadoop components is expected. The description's examples reinforce which log types are useful but add no format, size, or encoding guidance beyond the schema; baseline 3 applies.

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?

States a specific verb and resource ('Analyze EMR logs for known issues') and clarifies that it searches a curated knowledge base across Spark/YARN/Hadoop. The phrase 'directly provided EMR logs' implicitly separates it from the sibling cluster-level tool, but the sibling is never named, so the differentiation is left to inference.

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?

The three usage examples give concrete triggering contexts (OutOfMemoryError in Spark driver logs, container killed in YARN, HDFS namenode issues), and 'directly provided EMR logs' scopes the input. What is missing is an explicit when-not statement or a named alternative such as analyze_emr_cluster_logs.

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

Deploy Server

Other Tools