Skip to content

Commit c7ec569

Browse files
committed
fix(checkr): require work location state only for US locations
Checkr requires state for US work locations and country for non-US ones, so the item schema no longer marks state required for every location.
1 parent 76b3940 commit c7ec569

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎apps/sim/blocks/blocks/checkr.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const DATE_WAND = {
7373
const WORK_LOCATIONS_WAND = {
7474
enabled: true,
7575
prompt:
76-
'Generate a JSON array of Checkr work locations from the user description. Each item is an object with "state" (two-letter code, required), and optional "country" (ISO 3166-1 alpha-2, defaults to US) and "city". Return ONLY the JSON array.',
76+
'Generate a JSON array of Checkr work locations from the user description. Each item is an object with "country" (ISO 3166-1 alpha-2, defaults to US, required outside the US), "state" (two-letter code, required in the US), and optional "city". Return ONLY the JSON array.',
7777
generationType: 'json-array',
7878
} as const
7979

‎apps/sim/tools/checkr/create_candidate.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ export const checkrCreateCandidateTool: ToolConfig<
4040
items: {
4141
type: 'object',
4242
properties: {
43-
country: { type: 'string', description: 'Country (ISO 3166-1 alpha-2), defaults to US' },
44-
state: { type: 'string', description: 'Two-letter state code' },
43+
country: {
44+
type: 'string',
45+
description: 'Country (ISO 3166-1 alpha-2), defaults to US; required outside the US',
46+
},
47+
state: { type: 'string', description: 'Two-letter state code; required in the US' },
4548
city: { type: 'string', description: 'City name' },
4649
},
47-
required: ['state'],
4850
},
4951
required: false,
5052
visibility: 'user-or-llm',

‎apps/sim/tools/checkr/utils.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,13 @@ export const CHECKR_HIERARCHY_PARAMS = {
206206
items: {
207207
type: 'object',
208208
properties: {
209-
country: { type: 'string', description: 'Country (ISO 3166-1 alpha-2), defaults to US' },
210-
state: { type: 'string', description: 'Two-letter state code' },
209+
country: {
210+
type: 'string',
211+
description: 'Country (ISO 3166-1 alpha-2), defaults to US; required outside the US',
212+
},
213+
state: { type: 'string', description: 'Two-letter state code; required in the US' },
211214
city: { type: 'string', description: 'City name' },
212215
},
213-
required: ['state'],
214216
},
215217
required: false,
216218
visibility: 'user-or-llm' as ParameterVisibility,

‎apps/sim/tools/generated/tool-metadata.ts‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)