Working with batches
Use to prepare plans for multiple candidates and check whether they can be submitted.
Skill version: 1.0.0. Resource: skill://nadoobio-batch-screening/SKILL.md.
Principles
- For multiple candidates, do not repeatedly call
create_plan. Store inputs as CSV or FASTA in the project and usecreate_batch_plans. - First read the file's
generation,sha256, andinspectionVersionusinginspect_inputand pass them unchanged. Changed values producebatch_source_changed. - Do not guess column positions. Call
preview_batch_planswithmappings: []to inspectheaders(column index:name) and the data-row count. This call creates no plans. - Map columns by position (
columnIndex), not by name. If a name column exists, specify it withnameColumn. - After mapping, call
preview_batch_plansagain with the same arguments to check for rejected rows or setting problems, then callcreate_batch_plans. - If the user requested plans and the preview has no rejected rows or setting issues, proceed to
create_batch_plansin the same conversation. Creating plans does not execute them. Report both preview and creation results.
Reading results
- For
rejectedinrows, correct only that row and create it again with a newbatchRequestId. Retrying does not duplicate already-created plans. - Read the creation response's
approval.statusandreasonfirst. Forpending, give the person the returnedapproval.hrefto review plans, inputs, settings, and terms on the web and approve selected plans. ForreviewMode: exact_plan_list, review at most 100 at a time; one page's approval is not approval of the entire batch. Never record human consent using an API key. After approval, submit only when the user requests it, callingsubmit_batchwith the originalbatchId. For the olderindividual_plan_approval_requiredresponse, follow each plan'sget_planreview link andsubmit_planroute. Explain otherunavailablevalues according to the returned reason. submit_batchsubmits in row order. OnstoppedByQuota:true, reportquotaand stop. Retrying the samesubmitRequestIdreturns already-received rows asskipped.
Input formats and setting combinations
- Check supported inputs, chain counts, and required data in the current
get_tool_schemaandlist_execution_optionsresponses. Do not assume batch execution supports every individual-run input. - Use actual headers and schema setting keys for CSV mapping. Column indexes start at 0. Check the preview response for FASTA sequence/name column positions and supported setting combinations.
- Do not invent settings the user has not chosen. Distinguish source-row counts from the number of plans generated by combinations. Use preview counts, including errors and empty rows.
- Changes to settings, column mapping, or combination axes require a new creation request. If only the response was lost, recover with the original body and the same
batchRequestIdorsubmitRequestId. - planHash tracks inputs and settings; it does not guarantee identical bytes across environments. On completion, provide results, provenance, and the detail/structure links returned by the server.
Checking conditions before submission
After human approval, use get_plan to check current approval and usageTerms. If terms exist, check for acceptedAt and pass the returned usageTerms.termsHash unchanged as submit_batch.acceptedTermsHash. Passing a hash does not replace consent. If plans have different terms hashes, check each plan's current terms and use submit_plan individually rather than applying one hash to the batch. Retries after response loss must retain the original body and request ID.
Requerying a batch creation request returns current pending, approved, expired, and accepted counts in approval.counts. If approval.status is partial, review only remaining pending or expired items. If approved, check current terms and submission eligibility. If submitted, provide existing job links; do not request new approval or recreate the batch. approval.required: false means no new plan approval is needed for that lookup, not that current terms, permissions, and limits have passed.