Skip to main content
Glama

get_account_details

Retrieve authenticated user or service account details from Terraform Cloud, including identity verification, email address, and authentication status.

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function decorated with error handling that performs the API request to retrieve account details from Terraform Cloud.
    @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")
  • Tool registration in the MCP server using mcp.tool() decorator on the imported get_account_details function.
    mcp.tool()(account.get_account_details)
  • Pydantic schema/model for the account details request (empty since no input parameters required).
    class AccountDetailsRequest(APIRequest): """Request model for getting account details. This model is used for the GET /account/details endpoint which requires no parameters. The endpoint returns information about the currently authenticated user or service account. Reference: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/account#show-account-details Note: For team and organization tokens, this endpoint returns information about a synthetic "service user" account associated with the token. See: docs/models/account.md for reference """ pass # No parameters needed for this endpoint

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