Tool Call find_workitem

Searches for existing workitems by field criteria (combined with AND) and returns up to 20 matches to the agent. Read-only - it does not change anything.

See Tool Calls for the general concept.

When to use

Use find_workitem when the agent only has to look at other cases to make a decision - for example to check whether a contract exists or to read a field of a related case.

If you want to… Use
look at cases found by field values find_workitem
create a link to the cases found link_workitem
calculate a figure over many cases aggregate_workitems
find similar cases by their content rag_retrieval

Arguments

Argument Required Description
criteria yes Field name/value pairs to search for, combined with AND
filter no Additional condition for special cases. Pass through exactly as given in the prompt

How to write criteria, filter and <item>itemname</item> is described in Selecting Workitems.

Prompt example

Use the tool call "find_workitem" to search for the contract. Pass the extracted plate
number as the value for the index field "id", and the fixed value "Contract" for the index
field "$workflowgroup" inside the criteria parameter.
Example: {"criteria": {"id": "M-AH-4524", "$workflowgroup": "Contract"}}

If no workitem is found, do not call task_complete - answer with a short plain-text note.

Tips

  • Name the index fields and what they mean in your prompt - the agent does not know your field names.
  • Plan for zero, one and several matches.
  • The result is limited to 20 matches. If you need an exact number over more cases, use aggregate_workitems.