accessanalyzer_get_finding
Retrieve detailed JSON-formatted information about a specific AWS IAM Access Analyzer finding by specifying its ARN, region, and ID for in-depth analysis and resolution.
Instructions
Retrieve detailed information about a single finding.
Parameters:
aws_region (str): The AWS region - use 'us-east-1' if not specified.
analyzer_arn (str): The ARN of the analyzer.
finding_id (str): The ID of the finding to retrieve.
Returns:
str: JSON-formatted details of the finding.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analyzer_arn | Yes | ||
| aws_region | Yes | ||
| finding_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"analyzer_arn": {
"title": "Analyzer Arn",
"type": "string"
},
"aws_region": {
"title": "Aws Region",
"type": "string"
},
"finding_id": {
"title": "Finding Id",
"type": "string"
}
},
"required": [
"aws_region",
"analyzer_arn",
"finding_id"
],
"title": "accessanalyzer_get_findingArguments",
"type": "object"
}
Implementation Reference
- server.py:1005-1025 (handler)The tool handler function for 'accessanalyzer_get_finding', decorated with @mcp.tool() which registers it in the MCP framework. It uses boto3 to call AWS Access Analyzer's get_finding API and returns the finding details as JSON.@mcp.tool() async def accessanalyzer_get_finding( aws_region: str, analyzer_arn: str, finding_id: str ) -> str: """ Retrieve detailed information about a single finding. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. analyzer_arn (str): The ARN of the analyzer. finding_id (str): The ID of the finding to retrieve. Returns: str: JSON-formatted details of the finding. """ client = boto3.client('accessanalyzer', region_name=aws_region) response = client.get_finding(analyzerArn=analyzer_arn, id=finding_id) finding = response.get('finding', {}) return json.dumps(finding, indent=2, cls=DateTimeEncoder)
- server.py:1005-1005 (registration)The @mcp.tool() decorator registers the 'accessanalyzer_get_finding' tool.@mcp.tool()
- server.py:1006-1021 (schema)Input schema defined by type hints (aws_region: str, analyzer_arn: str, finding_id: str) and output str, with detailed docstring.async def accessanalyzer_get_finding( aws_region: str, analyzer_arn: str, finding_id: str ) -> str: """ Retrieve detailed information about a single finding. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. analyzer_arn (str): The ARN of the analyzer. finding_id (str): The ID of the finding to retrieve. Returns: str: JSON-formatted details of the finding. """