fix: correct extraction_status 'not_found' → 'not_available' in get_contract_content tool description#60
Draft
sd-gh-bot wants to merge 1 commit into
Draft
Conversation
… description
The actual API enum value for ContractContentExtractionStatus is NOT_AVAILABLE
('not_available'), not 'not_found'. The tool description was documenting the
wrong string, which could confuse AI models when parsing the API response.
Co-authored-by: Anjali Swami <vend-anjaliswami@spotdraft.com>
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.
User description
Problem
The
get_contract_contenttool description documented"not_found"as a possibleextraction_statusvalue, but the actual API enum (ContractContentExtractionStatus) emits"not_available". This mismatch could confuse the AI when parsing API responses.Related to the companion fix in
django-rest-api(#13656) which changes the/v2.1/public/contracts/{id}/contentendpoint to return HTTP 200 withextraction_status='not_available'instead of HTTP 400.Changes
src/tools/contracts/get_contract_content.ts: replace"not_found"with"not_available"in the extraction_status enum docs.Generated description
Below is a concise technical summary of the changes proposed in this PR:
Update the
get_contract_contenttool description to align the documentedextraction_statusvalues with theContractContentExtractionStatusresponses and avoid confusion during API parsing. Clarify thatnot_availablenow covers contracts whose content was never found or whose extraction has not yet been triggered.Latest Contributors(2)