Skip to main content
Glama
onsecurity
by onsecurity

get-findings

Retrieve and summarize security findings from OnSecurity for client review, with options to filter by round, search, and customize data presentation.

Instructions

Get all findings data from OnSecurity from client in a high level summary, 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. You can optionally filter findings by round_id. HOWEVER ONLY USE THIS TOOL WHEN ASKED FOR FINDINGS RELATED TO A CLIENT OR MY FINDINGS, NOT THE BLOCKS TOOL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
round_idNoOptional round ID to filter findings
round_typeNoOptional round type to filter rounds, 1 = pentest round, 3 = scan round
sortNoOptional sort parameter in format 'field-direction'. Available values: name-asc, round_id-asc, created_at-asc, updated_at-asc, name-desc, round_id-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,round,target_components')
fieldsNoOptional comma-separated list of fields to return (e.g. 'id,name'). 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 findings by name of finding or related content

Implementation Reference

  • The handler function that executes the logic for the 'get-findings' tool. It constructs filters from parameters, fetches paginated findings data via fetchPage, handles errors, formats the response using formatFinding and formatPaginationInfo, and returns a structured markdown summary.
    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_id filter if provided
        if (params.round_id) {
            filters['round_id-eq'] = params.round_id;
        }
        
        // Add round_type filter if provided
        if (params.round_type) {
            filters['round_type_id-eq'] = params.round_type;
        }
        
        const response = await fetchPage<ApiResponse<FindingFeature>>(
            'findings', 
            params.page || 1, 
            filters, 
            params.sort, 
            params.includes, 
            params.fields, 
            params.limit,
            params.search
        );
        
        if (!response) {
            return {
                content: [
                    {
                        type: "text",
                        text: "Error fetching findings data. Please try again."
                    }
                ]
            };
        }
        
        const paginationInfo = formatPaginationInfo(response);
        const formattedFindings = response.result.map(formatFinding);
        
        const responseText = [
            "# Findings Summary",
            "",
            "## Pagination Information",
            paginationInfo,
            "",
            "## Findings Data",
            ...formattedFindings
        ].join('\n');
    
        return {
            content: [
                {
                    type: "text",
                    text: responseText
                }
            ]
        };
    }
  • Zod schema for input parameters of the 'get-findings' tool, including optional filters, pagination, sorting, and search options.
    {
        round_id: z.number().optional().describe("Optional round ID to filter findings"),
        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, round_id-asc, created_at-asc, updated_at-asc, name-desc, round_id-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,round,target_components')"),
        fields: z.string().optional().describe("Optional comma-separated list of fields to return (e.g. 'id,name'). Use * as wildcard."),
        filters: FilterSchema,
        search: z.string().optional().describe("Search term to find findings by name of finding or related content")
    },
  • src/index.ts:442-519 (registration)
    Registration of the 'get-findings' tool using server.tool(), including name, description, input schema, and inline handler function.
        "get-findings",
        "Get all findings data from OnSecurity from client in a high level summary, 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. You can optionally filter findings by round_id. HOWEVER ONLY USE THIS TOOL WHEN ASKED FOR FINDINGS RELATED TO A CLIENT OR MY FINDINGS, NOT THE BLOCKS TOOL.",
        {
            round_id: z.number().optional().describe("Optional round ID to filter findings"),
            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, round_id-asc, created_at-asc, updated_at-asc, name-desc, round_id-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,round,target_components')"),
            fields: z.string().optional().describe("Optional comma-separated list of fields to return (e.g. 'id,name'). Use * as wildcard."),
            filters: FilterSchema,
            search: z.string().optional().describe("Search term to find findings by name of finding or related 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_id filter if provided
            if (params.round_id) {
                filters['round_id-eq'] = params.round_id;
            }
            
            // Add round_type filter if provided
            if (params.round_type) {
                filters['round_type_id-eq'] = params.round_type;
            }
            
            const response = await fetchPage<ApiResponse<FindingFeature>>(
                'findings', 
                params.page || 1, 
                filters, 
                params.sort, 
                params.includes, 
                params.fields, 
                params.limit,
                params.search
            );
            
            if (!response) {
                return {
                    content: [
                        {
                            type: "text",
                            text: "Error fetching findings data. Please try again."
                        }
                    ]
                };
            }
            
            const paginationInfo = formatPaginationInfo(response);
            const formattedFindings = response.result.map(formatFinding);
            
            const responseText = [
                "# Findings Summary",
                "",
                "## Pagination Information",
                paginationInfo,
                "",
                "## Findings Data",
                ...formattedFindings
            ].join('\n');
    
            return {
                content: [
                    {
                        type: "text",
                        text: responseText
                    }
                ]
            };
        }
    );
  • Helper function to format individual finding data into a readable string summary, used by the get-findings handler.
    function formatFinding(finding: FindingFeature): string {
        return [
            `Finding ID: ${finding.id}`,
            `Display ID: ${finding.display_id}`,
            `Name: ${finding.name}`,
            `Client ID: ${finding.client_id}`,
            `Round ID: ${finding.round_id}`,
            `CVSS Score: ${finding.cvss?.score || "N/A"}`,
            `Severity: ${finding.cvss?.severity_label || "N/A"}`,
            `Status: ${finding.status?.label || "Unknown"} (${finding.status?.description || "No description"})`,
            `Published: ${finding.published}`,
            `Remediation Complexity: ${finding.remediation_complexity || "N/A"}`,
            `Executive Description: ${finding.executive_description || "N/A"}`,
            `Executive Risk: ${finding.executive_risk || "N/A"}`,
            `Executive Recommendation: ${finding.executive_recommendation || "N/A"}`,
            `Description: ${finding.description || "N/A"}`,
            `Evidence: ${finding.evidence || "N/A"}`,
            `Recommendation: ${finding.recommendation || "N/A"}`,
            `--------------------------------`,
        ].join('\n');
    }
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. While it mentions the tool returns 'a high level summary, only include the summary, not the raw data', it doesn't describe important behavioral aspects like authentication requirements, rate limits, pagination behavior (implied by limit/page parameters but not explained), or what happens when no findings exist. The description adds some context about presentation format but misses key operational details.

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 but has structural issues. The first sentence contains multiple clauses that could be separated. The usage warning is tacked on at the end rather than integrated. While not excessively verbose, the flow could be improved for better front-loading of key information.

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 tool with 9 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the relationship between parameters, how filtering works in practice, what the summary format looks like, or error conditions. The description focuses on usage constraints and basic purpose but leaves many operational questions unanswered given the tool's complexity.

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 already documents all 9 parameters thoroughly. The description only mentions the 'round_id' parameter specifically ('You can optionally filter findings by round_id') and implies summary formatting. It adds minimal value beyond what the schema provides, meeting the baseline for high schema coverage.

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's purpose: 'Get all findings data from OnSecurity from client in a high level summary'. It specifies the verb ('Get'), resource ('findings data'), and scope ('high level summary'). However, it doesn't explicitly differentiate from sibling tools like 'get-blocks' beyond the usage warning at the end.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: 'ONLY USE THIS TOOL WHEN ASKED FOR FINDINGS RELATED TO A CLIENT OR MY FINDINGS, NOT THE BLOCKS TOOL.' This clearly states when to use this tool versus alternatives, specifically warning against using it for 'blocks' requests.

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