|
23 | 23 | forecast_async, |
24 | 24 | merge_async, |
25 | 25 | rank_async, |
26 | | - screen_async, |
27 | 26 | single_agent_async, |
28 | 27 | ) |
29 | 28 | from everyrow.session import create_session, get_session_url, list_sessions |
|
48 | 47 | MergeInput, |
49 | 48 | ProgressInput, |
50 | 49 | RankInput, |
51 | | - ScreenInput, |
52 | 50 | SingleAgentInput, |
53 | 51 | StdioResultsInput, |
54 | 52 | UploadDataInput, |
@@ -509,88 +507,6 @@ async def everyrow_rank(params: RankInput, ctx: EveryRowContext) -> list[TextCon |
509 | 507 | ) |
510 | 508 |
|
511 | 509 |
|
512 | | -@mcp.tool( |
513 | | - name="everyrow_screen", |
514 | | - structured_output=False, |
515 | | - annotations=ToolAnnotations( |
516 | | - title="Filter Rows by Criteria", |
517 | | - readOnlyHint=False, |
518 | | - destructiveHint=False, |
519 | | - idempotentHint=False, |
520 | | - openWorldHint=True, |
521 | | - ), |
522 | | -) |
523 | | -async def everyrow_screen( |
524 | | - params: ScreenInput, ctx: EveryRowContext |
525 | | -) -> list[TextContent]: |
526 | | - """Filter rows in a CSV file based on any criteria. |
527 | | -
|
528 | | - Dispatches web agents to research the criteria to filter the entities in the |
529 | | - table. Conducts research, and can also apply judgment to the results if the |
530 | | - criteria are qualitative. |
531 | | -
|
532 | | - Screen produces a boolean pass/fail verdict per row. If you provide a custom |
533 | | - response_schema, it MUST include at least one boolean property (e.g. |
534 | | - ``{"passes": {"type": "boolean"}}``). If the screening criteria need more than |
535 | | - a yes/no answer (e.g. a three-way classification), use everyrow_agent instead. |
536 | | -
|
537 | | - Examples: |
538 | | - - "Is this job posting remote-friendly AND senior-level AND salary disclosed?" |
539 | | - - "Is this vendor financially stable AND does it have good security practices?" |
540 | | - - "Is this lead likely to need our product based on company description?" |
541 | | -
|
542 | | - This function submits the task and returns immediately with a task_id and session_url. |
543 | | -
|
544 | | - Then immediately call everyrow_progress(task_id) to monitor. |
545 | | - Once the task is completed, call everyrow_results to save the output. |
546 | | -
|
547 | | - Args: |
548 | | - params: ScreenInput |
549 | | -
|
550 | | - Returns: |
551 | | - Success message containing task_id for monitoring progress |
552 | | - """ |
553 | | - logger.info( |
554 | | - "everyrow_screen: task=%.80s rows=%s", |
555 | | - params.task, |
556 | | - len(params.data) if params.data else "artifact", |
557 | | - ) |
558 | | - log_client_info(ctx, "everyrow_screen") |
559 | | - client = _get_client(ctx) |
560 | | - |
561 | | - input_data = params._aid_or_dataframe |
562 | | - |
563 | | - response_model: type[BaseModel] | None = None |
564 | | - if params.response_schema: |
565 | | - response_model = _schema_to_model("ScreenResult", params.response_schema) |
566 | | - |
567 | | - async with create_session( |
568 | | - client=client, session_id=params.session_id, name=params.session_name |
569 | | - ) as session: |
570 | | - session_url = session.get_url() |
571 | | - session_id_str = str(session.session_id) |
572 | | - cohort_task = await screen_async( |
573 | | - task=params.task, |
574 | | - session=session, |
575 | | - input=input_data, |
576 | | - response_model=response_model, |
577 | | - ) |
578 | | - task_id = str(cohort_task.task_id) |
579 | | - total = len(input_data) if isinstance(input_data, pd.DataFrame) else 0 |
580 | | - |
581 | | - return await create_tool_response( |
582 | | - task_id=task_id, |
583 | | - session_url=session_url, |
584 | | - label=f"Submitted: {total} rows for screening." |
585 | | - if total |
586 | | - else "Submitted: artifact for screening.", |
587 | | - token=client.token, |
588 | | - total=total, |
589 | | - mcp_server_url=ctx.request_context.lifespan_context.mcp_server_url, |
590 | | - session_id=session_id_str, |
591 | | - ) |
592 | | - |
593 | | - |
594 | 510 | @mcp.tool( |
595 | 511 | name="everyrow_dedupe", |
596 | 512 | structured_output=False, |
@@ -922,7 +838,7 @@ async def everyrow_upload_data( |
922 | 838 | ) -> list[TextContent]: |
923 | 839 | """Upload data from a URL or local file. Returns an artifact_id for use in processing tools. |
924 | 840 |
|
925 | | - Use this tool to ingest data before calling everyrow_agent, everyrow_screen, |
| 841 | + Use this tool to ingest data before calling everyrow_agent, |
926 | 842 | everyrow_rank, everyrow_dedupe, everyrow_merge, everyrow_classify, or everyrow_forecast. |
927 | 843 |
|
928 | 844 | Supported sources: |
@@ -1090,7 +1006,7 @@ async def everyrow_progress( |
1090 | 1006 | summaries: list[dict[str, Any]] | None = None |
1091 | 1007 | cursor: str | None = params.cursor |
1092 | 1008 |
|
1093 | | - if not ts.is_terminal and not ts.is_screen: |
| 1009 | + if not ts.is_terminal: |
1094 | 1010 | if ts.completed > 0: |
1095 | 1011 | ( |
1096 | 1012 | (partial_rows, rows_cursor), |
|
0 commit comments