Skip to main content
Glama
metehan777

AlsoAsked MCP Server

by metehan777

get_account_info

Retrieve account details such as credits, plan information, and usage statistics for managing API access and monitoring resource consumption.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that implements the get_account_info tool. It calls the AlsoAsked API /account endpoint to fetch account details and returns a formatted text response with the account info 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: {}, }, },
  • src/index.ts:224-225 (registration)
    Dispatch registration in the CallToolRequestSchema switch statement that routes calls to the get_account_info handler.
    case 'get_account_info': return await this.handleGetAccount();
  • TypeScript interface defining the structure of the account object returned by the API and used in the handler.
    interface Account { id: string; name: string; email: string; credits: number; plan: string; }

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