Skip to content

MCP process_documents drops required organizationId and documentIds #3539

Description

@filipenevola

Problem

The generated MCP process_documents tool exposes an effectively empty request schema, while the API endpoint requires organizationId and a non-empty documentIds array. MCP clients can send those fields, but the generated DTO/model strips them before the API request, which then fails validation.

Reproduction

  1. Upload one or more knowledge-base documents successfully.
  2. Call the MCP process_documents tool with the organization ID and uploaded document IDs.
  3. Observe that the API receives neither required field and responds with validation errors.

The current MCP tool schema is equivalent to:

{ request: { [key: string]: unknown } }

but the generated model used by the MCP server has no declared properties, so strict schema parsing removes the input.

Expected

The MCP DTO/schema should declare and forward:

{
  organizationId: string;
  documentIds: string[]; // non-empty
}

An integration test should call the MCP tool with both fields and assert that processing starts for the selected documents.

Security/privacy

No organization IDs, document IDs, document names, or customer content are included in this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions