Skip to main content
Glama

get_all_reports

Retrieve all penetration testing reports from the API to manage security assessments, vulnerabilities, and documentation with CVSS scoring and authentication support.

Instructions

Retrieve all reports from the API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bearerTokenNoBearer token for authentication (optional if REPORTS_JWT_TOKEN env var is set)

Implementation Reference

  • The handler function that executes the tool: fetches all reports via API GET request using provided or env bearer token, handles errors, returns MCP-formatted content with JSON data.
    async function getAllReports(providedToken) { try { const bearerToken = getBearerToken(providedToken); const response = await axios.get(REPORTS_ENDPOINT, { headers: { 'Authorization': `Bearer ${bearerToken}`, 'Content-Type': 'application/json', }, timeout: 10000, }); return { content: [ { type: 'text', text: JSON.stringify({ success: true, status: response.status, data: response.data, timestamp: new Date().toISOString(), message: `Retrieved ${response.data?.length || 0} reports`, }, null, 2), }, ], }; } catch (error) { if (error instanceof McpError) { throw error; } if (error.response) { return { content: [ { type: 'text', text: JSON.stringify({ success: false, status: error.response.status, error: error.response.data || error.message, timestamp: new Date().toISOString(), }, null, 2), }, ], }; } else if (error.request) { throw new McpError( ErrorCode.InternalError, `Network error: Unable to reach the API at ${REPORTS_ENDPOINT}` ); } else { throw new McpError( ErrorCode.InternalError, `Request setup error: ${error.message}` ); } }
  • Input schema definition for the tool in the ListTools response: accepts optional bearerToken.
    name: 'get_all_reports', description: 'Retrieve all reports from the API', inputSchema: { type: 'object', properties: { bearerToken: { type: 'string', description: 'Bearer token for authentication (optional if REPORTS_JWT_TOKEN env var is set)', }, }, required: [], }, },
  • server.js:1128-1129 (registration)
    Tool dispatch/registration in the CallToolRequestSchema handler switch statement: calls the getAllReports handler.
    case 'get_all_reports': return await getAllReports(args.bearerToken);

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/izzy0101010101/mcp-reports-server'

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