get_account_profile
Retrieve your Shodan account details, including membership status and available credits, to manage API usage and access levels.
Instructions
Get account profile information including membership status and credits
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:562-575 (handler)Core handler function in ShodanClient that executes the API call to retrieve account profile from Shodan /account/profile endpoint.async getAccountProfile(): Promise<any> { try { const response = await this.axiosInstance.get("/account/profile"); return response.data; } catch (error: unknown) { if (axios.isAxiosError(error)) { throw new McpError( ErrorCode.InternalError, `Shodan API error: ${error.response?.data?.error || error.message}` ); } throw error; } }
- src/index.ts:1793-1811 (handler)MCP server tool call handler that invokes the ShodanClient.getAccountProfile method and formats the response.case "get_account_profile": { try { const accountProfile = await shodanClient.getAccountProfile(); return { content: [{ type: "text", text: JSON.stringify(accountProfile, null, 2) }] }; } catch (error) { if (error instanceof McpError) { throw error; } throw new McpError( ErrorCode.InternalError, `Error getting account profile: ${(error as Error).message}` ); } }
- src/index.ts:1147-1154 (registration)Tool registration in the ListToolsRequestSchema response, including name, description, and empty input schema.{ name: "get_account_profile", description: "Get account profile information including membership status and credits", inputSchema: { type: "object", properties: {} } },
- src/index.ts:1147-1154 (schema)Input schema definition for the tool (empty object since no parameters required).{ name: "get_account_profile", description: "Get account profile information including membership status and credits", inputSchema: { type: "object", properties: {} } },