Add context-only mode: Claude Code writes blocks, no API needed
New architecture: MCP provides context, Claude Code writes. New functions: - get_block_context(case_id, block_id) → returns full context package (prompt, source docs, claims, direction, precedents, style guide) WITHOUT calling Anthropic API - save_block_content(case_id, block_id, content) → saves block to DB New MCP tools: get_block_context, save_block_content The old write_block (API-based) still works as fallback. The new flow uses Claude Code's own model (Opus 4.6, 1M context) which has no separate API billing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -223,6 +223,26 @@ async def get_decision_template(case_number: str) -> str:
|
||||
return await drafting.get_decision_template(case_number)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
async def get_block_context(
|
||||
case_number: str,
|
||||
block_id: str,
|
||||
instructions: str = "",
|
||||
) -> str:
|
||||
"""קבלת הקשר מלא לכתיבת בלוק — ללא API. Claude Code כותב ושומר."""
|
||||
return await drafting.get_block_context(case_number, block_id, instructions)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
async def save_block_content(
|
||||
case_number: str,
|
||||
block_id: str,
|
||||
content: str,
|
||||
) -> str:
|
||||
"""שמירת בלוק שנכתב ע"י Claude Code ב-DB."""
|
||||
return await drafting.save_block_content(case_number, block_id, content)
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
async def validate_decision(case_number: str) -> str:
|
||||
"""בדיקת QA — 6 בדיקות איכות על ההחלטה. אם בדיקה קריטית נכשלת — ייצוא חסום."""
|
||||
|
||||
Reference in New Issue
Block a user