Skip to main content
Glama
severity1

terraform-cloud-mcp

get_assessment_result_details

Retrieve detailed information about a Terraform Cloud assessment result, including status, drift detection, and related resource links.

Instructions

Get details for a specific assessment result.

Retrieves comprehensive information about an assessment result including its current status, whether drift was detected, and links to related resources like JSON output and logs.

API endpoint: GET /api/v2/assessment-results/{assessment_result_id}

Args: assessment_result_id: The ID of the assessment result to retrieve details for (format: "asmtres-xxxxxxxx")

Returns: Assessment result details including status, timestamps, and drift detection information

See: docs/tools/assessment_results.md for reference documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assessment_result_idYes

Implementation Reference

  • The main handler function that validates input using Pydantic model and fetches assessment result details from Terraform Cloud API.
    @handle_api_errors
    async def get_assessment_result_details(assessment_result_id: str) -> APIResponse:
        """Get details for a specific assessment result.
    
        Retrieves comprehensive information about an assessment result including its current status,
        whether drift was detected, and links to related resources like JSON output and logs.
    
        API endpoint: GET /api/v2/assessment-results/{assessment_result_id}
    
        Args:
            assessment_result_id: The ID of the assessment result to retrieve details for (format: "asmtres-xxxxxxxx")
    
        Returns:
            Assessment result details including status, timestamps, and drift detection information
    
        See:
            docs/tools/assessment_results.md for reference documentation
        """
        # Validate parameters
        params = AssessmentResultRequest(assessment_result_id=assessment_result_id)
    
        # Make API request
        return await api_request(f"assessment-results/{params.assessment_result_id}")
  • Pydantic model defining and validating the input parameter 'assessment_result_id' with regex pattern for Terraform Cloud assessment result IDs.
    class AssessmentResultRequest(APIRequest):
        """Request model for retrieving assessment result details.
    
        Used to validate the assessment result ID parameter for API requests.
    
        Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/assessment-results#show-assessment-result
    
        See:
            docs/models/assessment_result.md for reference
        """
    
        assessment_result_id: str = Field(
            ...,
            # No alias needed as field name matches API parameter
            description="The ID of the assessment result to retrieve",
            pattern=r"^asmtres-[a-zA-Z0-9]{8,}$",  # Standard assessment result ID pattern
        )
  • Registers the get_assessment_result_details tool function with the MCP server using FastMCP's tool decorator.
    mcp.tool()(assessment_results.get_assessment_result_details)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions retrieving 'comprehensive information' and lists some content types (status, drift detection, links), but doesn't address important aspects like authentication requirements, rate limits, error conditions, or whether this is a read-only operation. The API endpoint format is helpful but insufficient for full transparency.

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 well-structured and appropriately sized. It front-loads the core purpose, then provides supporting details about what's retrieved, the API endpoint, parameter format, return content, and documentation reference. Each section serves a clear purpose with minimal redundancy.

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

Completeness3/5

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

For a single-parameter read operation with no output schema, the description provides adequate but incomplete context. It covers the basic purpose, parameter format, and return content types, but lacks information about authentication, error handling, and how this tool relates to its many siblings. The documentation reference helps, but the description itself should be more self-contained.

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

Parameters4/5

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

With only one parameter and 0% schema description coverage, the description provides essential semantic context that the schema lacks. It explains that 'assessment_result_id' identifies the specific result to retrieve and provides the expected format ('asmtres-xxxxxxxx'), which is crucial information not present in the schema's minimal title.

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 with a specific verb ('Get details') and resource ('assessment result'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'get_assessment_json_output' or 'get_assessment_log_output', which appear to retrieve related but different resources.

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 mentions related resources like JSON output and logs, but doesn't specify whether those should be retrieved via this tool or the sibling tools dedicated to them. No context about prerequisites or exclusions is provided.

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/severity1/terraform-cloud-mcp'

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