feat(mcp): halacha_corroboration read-only tool (INV-COR6, X11)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3439,6 +3439,28 @@ async def store_corroboration(
|
||||
)
|
||||
|
||||
|
||||
async def list_corroboration_for_halacha(halacha_id: UUID) -> list[dict]:
|
||||
"""Return all corroboration rows for one halacha, ordered by match_score DESC."""
|
||||
pool = await get_pool()
|
||||
rows = await pool.fetch(
|
||||
"SELECT treatment, match_score, match_context, citing_case_law_id::text, "
|
||||
" citing_decision_id::text, created_at "
|
||||
"FROM halacha_citation_corroboration WHERE halacha_id = $1 "
|
||||
"ORDER BY match_score DESC", halacha_id,
|
||||
)
|
||||
return [
|
||||
{
|
||||
"treatment": r["treatment"],
|
||||
"match_score": float(r["match_score"]) if r["match_score"] is not None else None,
|
||||
"match_context": r["match_context"],
|
||||
"citing_case_law_id": r["citing_case_law_id"],
|
||||
"citing_decision_id": r["citing_decision_id"],
|
||||
"created_at": r["created_at"].isoformat() if r["created_at"] else None,
|
||||
}
|
||||
for r in rows
|
||||
]
|
||||
|
||||
|
||||
async def search_precedent_library_semantic(
|
||||
query_embedding: list[float],
|
||||
practice_area: str = "",
|
||||
|
||||
Reference in New Issue
Block a user