Skip to content

relevance_list_knowledge_rows MCP tool: no filter support + row_count unreliable #8

@charliebirch

Description

@charliebirch

Summary

Two related issues with the knowledge table MCP tools that make it impossible to filter rows or reliably assess table size from Claude Code.


Issue 1: relevance_list_knowledge_rows has no filter parameter

The relevance_list_knowledge_rows tool only accepts table_name, page, and page_size. There is no way to filter rows by field value via MCP.

Workaround: Use relevance_api_request with the flat /knowledge/list endpoint and a filters array in the body:

{
  "method": "POST",
  "endpoint": "/knowledge/list",
  "body": {
    "knowledge_set": "aws_contacts",
    "filters": [{"filter_type": "exact_match", "field": "data.account_name", "condition_value": "Tapestry Inc."}],
    "page_size": 20
  }
}

Note: REST-style paths like /knowledge/sets/{name}/list, /knowledge/sets/{name}/documents/filter, /knowledge/sets/{name}/search, and /knowledge/sets/{name}/get_where all return 404 — so the flat /knowledge/list path is the only option.

Requested: Add a filters parameter to relevance_list_knowledge_rows so rows can be filtered by field value without dropping to raw API calls.


Issue 2: relevance_get_knowledge_table_info returns unreliable row_count

The row_count field returned by relevance_get_knowledge_table_info does not accurately reflect the number of documents in the table. In testing, a table with ~174 rows returned row_count: 1.

Impact: Claude Code cannot use row_count to decide how many pages to fetch, leading to either over-fetching or missed rows.

Requested: Fix row_count to return the actual document count, or document what it represents if it's intentionally counting something else (e.g. unique aliases).


Reproduction

  • Table: aws_contacts (~174 rows)
  • relevance_get_knowledge_table_info returned row_count: 1
  • relevance_list_knowledge_rows with page_size: 10 required 18 pages to retrieve all rows
  • All filter/search REST-style paths on relevance_api_request returned 404

Environment

  • Claude Code with relevance-ai-amazon MCP server
  • Discovered during knowledge table scanning session (2026-04-04)

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