2 Commits

Author SHA1 Message Date
Ousama Ben Younes 64062ac761 fix: address CodeRabbit review — remove side-effectful test import and normalize timeline depth params
- tests/servers/mcp-tool-schemas.test.ts: remove `import '../../src/servers/mcp-server.js'`
  which triggered server startup side effects; test only needs to read the TS source as text
- src/services/worker/SearchManager.ts: add Number() coercion for depth_before/depth_after
  in timeline(), getContextTimeline(), getTimelineByQuery() — HTTP query strings deliver
  these as strings, coercion ensures they are always numbers before being passed to
  filterByDepth() and getTimelineAround*()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 17:30:59 +00:00
Ousama Ben Younes 8cdabe6315 fix: declare inputSchema properties for search and timeline MCP tools (#1384 #1413)
Both tools had properties:{} which prevents MCP clients from exposing
params to the LLM, causing every call to send {} and get a 500 error
("Either query or filters required for search").

- search: declare query, limit, project, type, obs_type, dateStart, dateEnd, offset, orderBy
- timeline: declare anchor, query, depth_before, depth_after, project
- Add 3 schema regression tests (static source validation)

Closes #1384
Closes #1413

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-07 17:21:19 +00:00