Skip to content

Conversation

zinthose
Copy link

@zinthose zinthose commented Sep 8, 2025

This pull request introduces a utility function to conditionally allow the use of the optional schema keyword for certain fields in the Salesforce query tool, based on an environment variable. The main changes revolve around making the whereClause, orderBy, and limit fields optionally marked as optional in the schema, depending on the environment configuration.

Conditional schema option support:

  • Added the isOptionalSchemaAllowed utility function to check if the environment variable SALESFORCE_OPTIONAL_SCHEMA_KEYWORD_ALLOW is set to "true". (src/tools/query.ts)
  • Updated the schema definitions for whereClause, orderBy, and limit in the QUERY_RECORDS tool to conditionally include the optional: true property if allowed by the environment variable. (src/tools/query.ts)

This was implemented to address the issue with requests failing when requiring a strict Schema.

@zinthose zinthose requested a review from tsmztech as a code owner September 8, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant