Skip to main content
Glama
onsecurity
by onsecurity

get-rounds

Retrieve and summarize security assessment rounds (pentest, scan, or radar) from OnSecurity with filtering, sorting, and pagination options.

Instructions

Get all rounds data from OnSecurity from client in a high level summary. When replying, only include the summary, not the raw data and be sure to present the data in a way that is easy to understand for the client. Rounds can be pentest rounds, scan rounds, or radar rounds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
round_typeNoOptional round type to filter rounds, 1 = pentest round, 3 = scan round
sortNoOptional sort parameter in format 'field-direction'. Available values: name-asc, start_date-asc, end_date-asc, authorisation_date-asc, hours_estimate-asc, created_at-asc, updated_at-asc, name-desc, start_date-desc, end_date-desc, authorisation_date-desc, hours_estimate-desc, created_at-desc, updated_at-desc. Default: id-asc
limitNoOptional limit parameter for max results per page (e.g. 15)
pageNoOptional page number to fetch (default: 1)
includesNoOptional related data to include as comma-separated values (e.g. 'client,findings,targets')
fieldsNoOptional comma-separated list of fields to return (e.g. 'id,name,started'). Use * as wildcard.
filtersNoOptional additional filters in format {field: value} or {field-operator: value} where operator can be mt (more than), mte (more than equal), lt (less than), lte (less than equal), eq (equals, default)
searchNoSearch term to find rounds by name of round or name of client

Implementation Reference

  • The main handler function for the 'get-rounds' tool. Processes input parameters to build filters, fetches paginated rounds data from the OnSecurity API using fetchPage, formats the results using formatRound and formatPaginationInfo, constructs a markdown summary, and returns it as MCP text content.
    async (params) => {
        const filters: Record<string, string | number> = {};
        
        // Add additional filters if provided
        if (params.filters) {
            Object.entries(params.filters).forEach(([key, value]) => {
                filters[key] = value;
            });
        }
        
        // Add round_type filter if provided
        if (params.round_type) {
            filters['round_type_id-eq'] = params.round_type;
        }
        
        const response = await fetchPage<ApiResponse<RoundFeature>>(
            'rounds', 
            params.page || 1, 
            filters, 
            params.sort, 
            params.includes, 
            params.fields, 
            params.limit,
            params.search
        );
        
        if (!response) {
            return {
                content: [
                    {
                        type: "text",
                        text: "Error fetching rounds data. Please try again."
                    }
                ]
            };
        }
        
        const paginationInfo = formatPaginationInfo(response);
        const formattedRounds = response.result.map(formatRound);
        
        const responseText = [
            "# Rounds Summary",
            "",
            "## Pagination Information",
            paginationInfo,
            "",
            "## Rounds Data",
            ...formattedRounds
        ].join('\n');
    
        return {
            content: [
                {
                    type: "text",
                    text: responseText
                }
            ]
        };
    }
  • Zod input schema defining optional parameters for filtering, sorting, pagination, includes, fields, custom filters, and search for the 'get-rounds' tool.
        round_type: z.number().optional().describe("Optional round type to filter rounds, 1 = pentest round, 3 = scan round"),
        sort: z.string().optional().describe("Optional sort parameter in format 'field-direction'. Available values: name-asc, start_date-asc, end_date-asc, authorisation_date-asc, hours_estimate-asc, created_at-asc, updated_at-asc, name-desc, start_date-desc, end_date-desc, authorisation_date-desc, hours_estimate-desc, created_at-desc, updated_at-desc. Default: id-asc"),
        limit: z.number().optional().describe("Optional limit parameter for max results per page (e.g. 15)"),
        page: z.number().optional().describe("Optional page number to fetch (default: 1)"),
        includes: z.string().optional().describe("Optional related data to include as comma-separated values (e.g. 'client,findings,targets')"),
        fields: z.string().optional().describe("Optional comma-separated list of fields to return (e.g. 'id,name,started'). Use * as wildcard."),
        filters: FilterSchema,
        search: z.string().optional().describe("Search term to find rounds by name of round or name of client")
    },
  • src/index.ts:366-438 (registration)
    Registration of the 'get-rounds' tool using server.tool(), including name, description, input schema, and inline handler function.
    server.tool(
        "get-rounds",
        "Get all rounds data from OnSecurity from client in a high level summary. When replying, only include the summary, not the raw data and be sure to present the data in a way that is easy to understand for the client. Rounds can be pentest rounds, scan rounds, or radar rounds.",
        {
            round_type: z.number().optional().describe("Optional round type to filter rounds, 1 = pentest round, 3 = scan round"),
            sort: z.string().optional().describe("Optional sort parameter in format 'field-direction'. Available values: name-asc, start_date-asc, end_date-asc, authorisation_date-asc, hours_estimate-asc, created_at-asc, updated_at-asc, name-desc, start_date-desc, end_date-desc, authorisation_date-desc, hours_estimate-desc, created_at-desc, updated_at-desc. Default: id-asc"),
            limit: z.number().optional().describe("Optional limit parameter for max results per page (e.g. 15)"),
            page: z.number().optional().describe("Optional page number to fetch (default: 1)"),
            includes: z.string().optional().describe("Optional related data to include as comma-separated values (e.g. 'client,findings,targets')"),
            fields: z.string().optional().describe("Optional comma-separated list of fields to return (e.g. 'id,name,started'). Use * as wildcard."),
            filters: FilterSchema,
            search: z.string().optional().describe("Search term to find rounds by name of round or name of client")
        },
        async (params) => {
            const filters: Record<string, string | number> = {};
            
            // Add additional filters if provided
            if (params.filters) {
                Object.entries(params.filters).forEach(([key, value]) => {
                    filters[key] = value;
                });
            }
            
            // Add round_type filter if provided
            if (params.round_type) {
                filters['round_type_id-eq'] = params.round_type;
            }
            
            const response = await fetchPage<ApiResponse<RoundFeature>>(
                'rounds', 
                params.page || 1, 
                filters, 
                params.sort, 
                params.includes, 
                params.fields, 
                params.limit,
                params.search
            );
            
            if (!response) {
                return {
                    content: [
                        {
                            type: "text",
                            text: "Error fetching rounds data. Please try again."
                        }
                    ]
                };
            }
            
            const paginationInfo = formatPaginationInfo(response);
            const formattedRounds = response.result.map(formatRound);
            
            const responseText = [
                "# Rounds Summary",
                "",
                "## Pagination Information",
                paginationInfo,
                "",
                "## Rounds Data",
                ...formattedRounds
            ].join('\n');
    
            return {
                content: [
                    {
                        type: "text",
                        text: responseText
                    }
                ]
            };
        }
    );
  • Helper function used by the handler to format individual RoundFeature objects into readable multi-line strings.
    function formatRound(round: RoundFeature): string {
        return [
            `Round ID: ${round.id}`,
            `Client ID: ${round.client_id}`,
            `Round Type: ${round.round_type_id === 1 ? "pentest round" : round.round_type_id === 3 ? "scan round" : round.round_type_id}`,
            `Estimated: ${round.estimate.time} ${round.estimate.period}`,
            `Start Date: ${round.start_date || "Unknown"}`,
            `End Date: ${round.end_date || "Unknown"}`,
            `Started: ${round.started}`,
            `Completed: ${round.finished}`,
            `Name: ${round.name}`,
            `Executive Summary Published: ${round.executive_summary_published}`,
            `--------------------------------`,
        ].join('\n');
  • Generic helper function used by the handler to fetch a paginated page of data from the OnSecurity API, building query parameters from inputs.
    async function fetchPage<T>(
      basePath: string,
      page: number = 1,
      filters: Record<string, string | number> = {},
      sort?: string,
      includes?: string,
      fields?: string,
      limit?: number,
      search?: string
    ): Promise<T | null> {
      // Build query parameters
      const queryParams = new URLSearchParams();
      
      // Add page parameter
      queryParams.append('page', page.toString());
      
      // Add limit if provided
      if (limit) queryParams.append('limit', limit.toString());
      
      // Add sort if provided
      if (sort) queryParams.append('sort', sort);
      
      // Add includes if provided
      if (includes) queryParams.append('include', includes);
      
      // Add fields if provided
      if (fields) queryParams.append('fields', fields);
      
      // Add search if provided
      if (search) queryParams.append('search', search);
      
      // Add filters
      Object.entries(filters).forEach(([key, value]) => {
        queryParams.append(`filter[${key}]`, value.toString());
      });
      
      const url = `${ONSECURITY_API_BASE}/${basePath}?${queryParams.toString()}`;
      return await makeOnSecurityRequest<T>(url);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool gets data and should output a summary, but lacks critical details: it doesn't mention whether this is a read-only operation, potential rate limits, authentication requirements, or what happens with large datasets (e.g., pagination behavior). The instruction to 'present the data in a way that is easy to understand' is more about output formatting than tool behavior.

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

Conciseness3/5

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

The description is reasonably concise with three sentences, but the second sentence about 'When replying...' contains presentation instructions that don't belong in a tool description (should be in the agent's prompt, not the tool definition). This reduces efficiency. The structure is front-loaded with the core purpose but includes extraneous content.

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?

Given the complexity (8 parameters, no annotations, no output schema), the description is incomplete. It doesn't address key behavioral aspects like safety (read vs. write), performance considerations, or what the output looks like. The presentation instructions don't compensate for missing tool behavior context. For a data retrieval tool with rich parameters but no structured safety hints, more guidance is needed.

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?

The schema description coverage is 100%, with all 8 parameters well-documented in the input schema. The description adds no parameter-specific information beyond what's already in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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

Purpose4/5

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

The description clearly states the tool retrieves 'all rounds data from OnSecurity' and provides a 'high level summary', which is a specific verb+resource combination. It distinguishes the types of rounds (pentest, scan, radar) but doesn't explicitly differentiate from sibling tools like get-findings or get-blocks, keeping it at a 4 rather than 5.

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 get-findings or get-blocks. It mentions that the output should be a summary for the client, but this is about presentation rather than tool selection criteria. No explicit when/when-not or alternative tools are referenced.

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

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