Skip to content

Cannot create index due to parameter name mismatch in context_index.py #3

@mammothrider

Description

@mammothrider

Description
The context_index tool fails with a TypeError because the parameter name doesn't match the ContextEngineClient.index() method.

Location
context_engine/tools/context_index.py line 17

Root Cause

  • The tool passes path=path to client.index()
  • But ContextEngineClient.index() method expects subdir parameter, not path

Code Comparison

context_index.py:

result = await client.index(path=path)  # WRONG

client.py (line 184):

async def index(self, subdir: str = "", collection: str | None = None, recreate: bool = False) -> dict[str, Any]:
    """Trigger indexing of the workspace or a subdirectory.
    Args:
        subdir: Relative path under /work to index ("" for full workspace).
        ...
    """

Fix

result = await client.index(subdir=path)

Impact

  • Users cannot index project directories using context_index tool
  • Error: TypeError: ContextEngineClient.index() got an unexpected keyword argument 'path'

Also, the config.html does not show any "Project Folder Path" field, only "Service Status" section

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