Draft
Conversation
- Added new write tools: `upload_contract_version`, `send_contract_to_counterparties`, `create_contract_approvals`, and `add_contract_comment`. - Updated the README to document write tools and how to enable write mode via query parameters or environment variables. - Enhanced the tool registry to conditionally include write tools based on the write mode status. - Implemented error handling for attempts to invoke write tools when write mode is disabled, returning a `WriteDisabledError`. - Updated API error handling to provide more context on upstream errors. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1. auth_lookup: resolveRoleNameToId throws ValidationError on multiple matches with colliding names in metadata for agent disambiguation 2. spotdraft_client: extract buildApiErrorMessage helper to deduplicate error message logic between get and post 3. write_mode: request-scoped write mode via AsyncLocalStorage; no global mutation from applyWriteModeFromRequest; HTTP uses runWithWriteModeAsync with per-request includeWrite 4. write_mode: parseTruthyQueryParam for query normalization (true/1/yes, arrays, booleans)
- Introduced new write tools: `upload_executed_contract`, `upload_contract_for_review`, and `upload_contract_for_signature`. - Updated the README to include descriptions for the new upload tools and their requirements. - Enhanced the tool registry to register the new upload tools, ensuring they are available when write mode is enabled. - Adjusted existing documentation to reflect the expanded capabilities of write tools.
- Introduced a new tool: `create_contract_from_template`, allowing users to create contracts from SpotDraft templates. - Updated the README to include detailed descriptions and requirements for the new tool. - Enhanced error handling in the SpotDraft client and tool handlers to provide more structured error responses. - Improved documentation for existing tools to clarify input requirements and encoding formats for `intake_form_data`. - Added utility functions for error serialization to improve logging and client context.
Contributor
Author
|
@codex rebase this |
|
Codex couldn't complete this request. Try again later. |
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
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Document how the handler/server pipeline and
SpotDraftClientnow gate write tools, emit structured MCP errors, and expose write mode state so clients can enableSD_MCP_ENABLE_WRITEorenable_write=truebefore calling write helpers. Describe how the README and tool registry now explain the new upload/approval/comment/send helpers along with their validation/auth documentation.upload_contract_version,send_contract_to_counterparties,create_contract_approvals,add_contract_comment,upload_executed_contract,upload_contract_for_review,upload_contract_for_signature,create_contract_from_template) only when permitted, and the supporting utilities (auth_lookup,validate_ids,spotdraft_questionnaire_value_docs) keep their inputs consistent.Modified files (14)
Latest Contributors(1)
Modified files (1)
Latest Contributors(1)
SD_MCP_ENABLE_WRITE(orenable_write=true) is set alongside the existing tooling instructions.Modified files (1)
Latest Contributors(2)
handler, HTTP/stdio servers,SpotDraftClient,ToolRegistry, and MCP errors surface contextual fields, serialize unknown failures, and returnWRITE_DISABLEDinstead of exposing write-only registry entries whenwrite_modeis off.Modified files (9)
Latest Contributors(2)