Skip to main content
Glama

create_report

Generate penetration testing reports with CVSS 3.1 scoring, HTML formatting, and secure authentication for documenting security assessments across platforms like iOS, Android, and Web.

Instructions

Create a new report

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bearerTokenNoBearer token for authentication (optional if REPORTS_JWT_TOKEN env var is set)
titleYesThe title/name of the report
platformNoThe platform for the report (e.g., iOS, Android, Web)
templateIdNoTemplate ID for the report (defaults to 67b1dac12c8d23272ad47cbd if not provided)
testersNoArray of tester IDs (optional, defaults to empty array)

Implementation Reference

  • The main handler function that executes the create_report tool logic: authenticates via bearer token, builds payload with title, platform, templateId, testers, posts to API, and returns success/error response.
    async function createReport(providedToken, reportData) {
      try {
        const bearerToken = getBearerToken(providedToken);
        
        // Build the report payload with default templateId if not provided
        const payload = {
          title: reportData.title || "",
          platform: reportData.platform || "",
          templateId: reportData.templateId || "67b1dac12c8d23272ad47cbd",
          testers: reportData.testers || []
        };
    
        const response = await axios.post(REPORTS_ENDPOINT, payload, {
          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: 'Report created successfully',
              }, 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 create_report tool, including properties for bearerToken, title (required), platform, templateId, testers.
    {
      name: 'create_report',
      description: 'Create a new report',
      inputSchema: {
        type: 'object',
        properties: {
          bearerToken: {
            type: 'string',
            description: 'Bearer token for authentication (optional if REPORTS_JWT_TOKEN env var is set)',
          },
          title: {
            type: 'string',
            description: 'The title/name of the report',
          },
          platform: {
            type: 'string',
            description: 'The platform for the report (e.g., iOS, Android, Web)',
          },
          templateId: {
            type: 'string',
            description: 'Template ID for the report (defaults to 67b1dac12c8d23272ad47cbd if not provided)',
          },
          testers: {
            type: 'array',
            items: {
              type: 'string'
            },
            description: 'Array of tester IDs (optional, defaults to empty array)',
          },
        },
        required: ['title'],
      },
    },
  • server.js:1131-1144 (registration)
    Registration in the CallToolRequestSchema handler switch statement: validates title presence and maps arguments to call the createReport handler.
    case 'create_report':
      if (!args.title) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Report title is required'
        );
      }
      return await createReport(args.bearerToken, {
        title: args.title,
        platform: args.platform,
        templateId: args.templateId,
        testers: args.testers,
      });
  • Helper utility to obtain bearer token for API calls, prioritizing provided token then environment variable REPORTS_JWT_TOKEN.
    function getBearerToken(providedToken) {
      // If a token is provided in the request, use it
      if (providedToken) {
        return providedToken;
      }
      
      // Otherwise, use the configured JWT token
      if (JWT_TOKEN) {
        return JWT_TOKEN;
      }
      
      // If no token is available, throw an error
      throw new McpError(
        ErrorCode.InvalidParams,
        'No bearer token provided. Either pass bearerToken parameter or set REPORTS_JWT_TOKEN environment variable.'
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. 'Create a new report' implies a write operation, but it doesn't disclose behavioral traits such as authentication requirements (though hinted in schema), permissions, whether creation is idempotent, or what happens on failure. This is insufficient for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description 'Create a new report' is extremely concise and front-loaded, with no wasted words. It efficiently conveys the core action in three words, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks crucial context like what the tool returns, error handling, or how it differs from sibling tools. Given the complexity and missing structured data, more detail is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond the schema, such as explaining parameter interactions or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a new report' clearly states the action (create) and resource (report), which is adequate. However, it doesn't differentiate from sibling tools like 'update_report' or specify what type of report is being created (e.g., test report, vulnerability report), leaving the purpose somewhat vague.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'update_report' or 'get_all_reports'. There's no mention of prerequisites, context, or exclusions, which is a significant gap given the sibling tools available.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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