Skip to main content
Glama

get_account_info

Retrieve account details such as credits, plan information, and usage stats for managing AlsoAsked API access effectively.

Instructions

Get account information including credits, plan details, and usage statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'get_account_info' that makes an API request to '/account', retrieves the account details, and returns a formatted JSON response with account information and a summary.
    private async handleGetAccount() { const account: Account = await this.makeApiRequest('/account', { method: 'GET', }); return { content: [ { type: 'text', text: JSON.stringify({ accountInfo: account, summary: `Account: ${account.name} (${account.email}) - ${account.credits} credits remaining on ${account.plan} plan` }, null, 2), }, ], }; }
  • src/index.ts:165-172 (registration)
    Registration of the 'get_account_info' tool in the ListTools response, defining its name, description, and empty input schema.
    { name: 'get_account_info', description: 'Get account information including credits, plan details, and usage statistics', inputSchema: { type: 'object', properties: {}, }, },
  • TypeScript interface defining the structure of the Account object used in the handler.
    interface Account { id: string; name: string; email: string; credits: number; plan: string; }
  • src/index.ts:224-225 (registration)
    Dispatch case in the CallToolRequest handler that routes 'get_account_info' calls to the handleGetAccount method.
    case 'get_account_info': return await this.handleGetAccount();

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/metehan777/alsoasked-mcp'

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