accessanalyzer_get_analyzer
Retrieve JSON-formatted details of a specific AWS IAM Access Analyzer by name and region to assess permissions and access configurations.
Instructions
Retrieve details of a specific analyzer by name.
Parameters:
aws_region (str): The AWS region - use 'us-east-1' if not specified.
analyzer_name (str): The name of the analyzer to retrieve.
Returns:
str: JSON-formatted details of the analyzer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| analyzer_name | Yes | ||
| aws_region | Yes |
Input Schema (JSON Schema)
{
"properties": {
"analyzer_name": {
"title": "Analyzer Name",
"type": "string"
},
"aws_region": {
"title": "Aws Region",
"type": "string"
}
},
"required": [
"aws_region",
"analyzer_name"
],
"title": "accessanalyzer_get_analyzerArguments",
"type": "object"
}
Implementation Reference
- server.py:948-966 (handler)The core handler function for the 'accessanalyzer_get_analyzer' MCP tool. Decorated with @mcp.tool() for automatic registration. It uses the boto3 AccessAnalyzer client to fetch details of a specific analyzer by name and returns JSON-formatted response.@mcp.tool() async def accessanalyzer_get_analyzer( aws_region: str, analyzer_name: str ) -> str: """ Retrieve details of a specific analyzer by name. Parameters: aws_region (str): The AWS region - use 'us-east-1' if not specified. analyzer_name (str): The name of the analyzer to retrieve. Returns: str: JSON-formatted details of the analyzer. """ client = boto3.client('accessanalyzer', region_name=aws_region) response = client.get_analyzer(analyzerName=analyzer_name) analyzer = response.get('analyzer', {}) return json.dumps(analyzer, indent=2, cls=DateTimeEncoder)
- server.py:948-948 (registration)The @mcp.tool() decorator registers the function as an MCP tool, using the function name 'accessanalyzer_get_analyzer' as the tool name.@mcp.tool()
- server.py:949-952 (schema)Type annotations define the input schema: aws_region (str), analyzer_name (str) and output str (JSON).async def accessanalyzer_get_analyzer( aws_region: str, analyzer_name: str ) -> str: