get_account_details
Retrieve account details including user ID, username, email, and authentication status for the authenticated Terraform Cloud API token. Verify identity and manage access efficiently.
Instructions
Get account details for a Terraform Cloud API token
This endpoint shows information about the currently authenticated user or service account, useful for verifying identity, retrieving email address, and checking authentication status. It returns the same type of object as the Users API, but also includes an email address, which is hidden when viewing info about other users.
API endpoint: GET /account/details
Returns: Raw API response with account information from Terraform Cloud including user ID, username, email address, and authentication status
See: docs/tools/account.md for reference documentation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function for the 'get_account_details' tool. It makes an API request to Terraform Cloud's /account/details endpoint to retrieve information about the authenticated user or service account.@handle_api_errors async def get_account_details() -> APIResponse: """Get account details for a Terraform Cloud API token This endpoint shows information about the currently authenticated user or service account, useful for verifying identity, retrieving email address, and checking authentication status. It returns the same type of object as the Users API, but also includes an email address, which is hidden when viewing info about other users. API endpoint: GET /account/details Returns: Raw API response with account information from Terraform Cloud including user ID, username, email address, and authentication status See: docs/tools/account.md for reference documentation """ return await api_request("account/details")
- terraform_cloud_mcp/server.py:50-50 (registration)Registration of the 'get_account_details' tool in the FastMCP server using mcp.tool() decorator.mcp.tool()(account.get_account_details)