Skip to main content
Glama
severity1

terraform-cloud-mcp

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
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does (returns account information including specific fields), mentions the API endpoint, and notes the unique email visibility aspect. It doesn't cover potential errors, rate limits, or authentication requirements, but provides solid behavioral context for a read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the core purpose. Each sentence adds value: purpose, use cases, return format comparison, API endpoint, return content, and documentation reference. No wasted words while maintaining completeness.

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

Completeness4/5

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

For a parameterless read operation with no annotations and no output schema, the description provides excellent context. It explains what information is returned, compares it to similar API responses, and references documentation. The main gap is lack of explicit mention that this is a read-only operation, though that's implied by 'Get' and the context.

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?

The tool has 0 parameters with 100% schema description coverage. The description appropriately doesn't waste space discussing non-existent parameters. It focuses on what the tool returns rather than inputs, which is correct for a parameterless tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get account details'), resource ('for a Terraform Cloud API token'), and scope ('currently authenticated user or service account'). It distinguishes itself from sibling tools by focusing on authentication/identity verification rather than resource management or run operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: 'useful for verifying identity, retrieving email address, and checking authentication status.' It doesn't explicitly mention when NOT to use it or name specific alternatives, but the purpose is sufficiently distinct from sibling tools that primarily manage resources, runs, or variables.

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