get_account_profile
Retrieve account profile details such as membership status and credits from the Shodan API for cybersecurity research and threat intelligence analysis.
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:1793-1811 (handler)MCP tool handler for get_account_profile that calls ShodanClient.getAccountProfile() and returns the result as JSON text content.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:562-575 (helper)ShodanClient helper method implementing the core logic: GET request to Shodan /account/profile endpoint with error handling.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:1147-1154 (registration)Tool registration entry in ListToolsRequestSchema handler defining the tool name, description, and empty input schema (no parameters required).{ name: "get_account_profile", description: "Get account profile information including membership status and credits", inputSchema: { type: "object", properties: {} } },
- src/index.ts:1150-1153 (schema)Input schema for get_account_profile tool: empty object properties indicating no input parameters are required.inputSchema: { type: "object", properties: {} }