fix: correct .default() misuse, API payload typo, and wrong tool name#450
Open
ZLeventer wants to merge 1 commit into
Open
fix: correct .default() misuse, API payload typo, and wrong tool name#450ZLeventer wants to merge 1 commit into
ZLeventer wants to merge 1 commit into
Conversation
… reference - run_apex_test.ts: change testRunId from .default() to .describe() — the description string was being used as the default value, meaning if no testRunId was provided, it would default to the literal string "an id of an in-progress, or completed apex test run" - create_org_snapshot.ts: fix 'metadatadata' → 'metadata' in the OrgSnapshot.create() API payload (Content field) - sfDevopsListWorkItems.ts: fix tool name reference from 'sf-list-all-orgs' → 'list_all_orgs' to match the actual registered tool name, preventing agents from calling a nonexistent tool
Author
|
I've signed the Salesforce CLA — recheck should pass now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three bug fixes in tool definitions:
1.
testRunIduses.default()instead of.describe()(run_apex_test.ts)The
testRunIdparameter uses.default('an id of an in-progress, or completed apex test run')— this sets the literal description string as the default value instead of documenting the parameter. If notestRunIdis provided, zod will populate it with that description string rather than leaving it undefined.Fix: Change
.default()to.describe().2.
'metadatadata'typo in OrgSnapshot API payload (create_org_snapshot.ts)The
Contentfield sent to the SalesforceOrgSnapshot.create()API is'metadatadata'instead of'metadata'. This could cause the API call to fail or behave unexpectedly.Fix: Change
'metadatadata'to'metadata'.3. Wrong tool name in agent instructions (sfDevopsListWorkItems.ts)
The tool description references
'sf-list-all-orgs'but the actual registered tool name is'list_all_orgs'. An LLM following these instructions would attempt to call a nonexistent tool.Fix: Change
'sf-list-all-orgs'to'list_all_orgs'.Test plan
testRunIdparam no longer has a default value (was description string, now uses.describe())create_org_snapshotsends correctContent: 'metadata'to Salesforce APIlist_devops_center_work_itemstool description references correct tool namelist_all_orgs