Project

General

Profile

Actions

dev #3960

open

[BE] Add Tool Card Data Schema and API for Fetching Tools

Added by Zahid Hassan 3 months ago.

Status:
In Progress
Priority:
High
Assignee:
Target version:
Start date:
12/29/2025
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

Description

We need to introduce a new Tool Card Data layer to support efficient retrieval of tool information for listing and discovery use cases.

This task includes creating a new database schema for tool card data and exposing a public API endpoint to fetch tools with filtering and pagination support. Input validation and sanitization must be enforced to ensure data integrity and security.


Scope of Work

  • Add a new tool_card_data schema in the database to store pre-aggregated tool information.

  • Implement a service layer to fetch tool data with support for filtering, sorting, and pagination.

  • Create a controller to handle incoming API requests and return formatted responses.

  • Add request validation schemas for all tool-fetching endpoints.

  • Update API routes to expose a new endpoint for retrieving all tools.

  • Integrate sanitize-html to sanitize user-provided input.

  • Add utility functions for:

    • Parsing requested response fields
    • Validating and normalizing incoming requests

Notes

  • Ensure pagination defaults and limits are well-defined.
  • Input sanitization must be applied to all user-controlled fields.
  • Schema design should support future extensibility.
Actions

Also available in: Atom PDF