Skip to content

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
mainfrom
fix/get-contract-content-tool-description
Draft

fix: correct extraction_status 'not_found' → 'not_available' in get_contract_content tool description#60
sd-gh-bot wants to merge 1 commit into
mainfrom
fix/get-contract-content-tool-description

Conversation

@sd-gh-bot
Copy link
Copy Markdown
Contributor

@sd-gh-bot sd-gh-bot commented May 8, 2026

User description

Problem

The get_contract_content tool description documented "not_found" as a possible extraction_status value, 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}/content endpoint to return HTTP 200 with extraction_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_content tool description to align the documented extraction_status values with the ContractContentExtractionStatus responses and avoid confusion during API parsing. Clarify that not_available now covers contracts whose content was never found or whose extraction has not yet been triggered.

Latest Contributors(2)
UserCommitDate
neo@spotdraft.comfix: correct extractio...May 08, 2026
achuth10chore: Refactor projec...February 05, 2026
This pull request is reviewed by Baz. Review like a pro on (Baz).

… 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>
@sachin-spotdraft sachin-spotdraft added the size/xs < 10 lines of changes label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs < 10 lines of changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants