Skip to main content
Glama

get_apply_details

Retrieve detailed information about a specific Terraform apply, including status, logs, resource counts, and relationships. Use the apply ID to access comprehensive data via the Terraform Cloud MCP server.

Instructions

Get details for a specific apply.

Retrieves comprehensive information about an apply including its current status, logs, resource counts, and relationship to other resources.

API endpoint: GET /applies/{apply_id}

Args: apply_id: The ID of the apply to retrieve details for (format: "apply-xxxxxxxx")

Returns: Apply details including status, timestamps, and resource change counts

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apply_idYes

Implementation Reference

  • The main handler function for the 'get_apply_details' tool. It validates the apply_id using ApplyRequest model, then calls the Terraform Cloud API to retrieve apply details.
    @handle_api_errors async def get_apply_details(apply_id: str) -> APIResponse: """Get details for a specific apply. Retrieves comprehensive information about an apply including its current status, logs, resource counts, and relationship to other resources. API endpoint: GET /applies/{apply_id} Args: apply_id: The ID of the apply to retrieve details for (format: "apply-xxxxxxxx") Returns: Apply details including status, timestamps, and resource change counts See: docs/tools/apply.md for reference documentation """ # Validate parameters params = ApplyRequest(apply_id=apply_id) # Make API request return await api_request(f"applies/{params.apply_id}")
  • Pydantic input schema model ApplyRequest used for validating the apply_id parameter in the handler.
    class ApplyRequest(APIRequest): """Request model for retrieving an apply. Used to validate the apply ID parameter for API requests. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/applies#show-an-apply See: docs/models/apply.md for reference """ apply_id: str = Field( ..., # No alias needed as field name matches API parameter description="The ID of the apply to retrieve", pattern=r"^apply-[a-zA-Z0-9]{16}$", # Standard apply ID pattern )
  • Registration of the 'get_apply_details' tool using FastMCP's mcp.tool() decorator.
    mcp.tool()(applies.get_apply_details)

Other Tools

Related 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