accept_model_share_request
Accept a pending model share request. Caller must have Owner or Editor access to the target model in the acting workspace (your current one, or workspace_id if passed — must be the request’s target tenant; OAuth/JWT sessions only). Writes the source model file to the target repo with a provenance header.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
request_id | Annotated[str, Field(description='UUID of the model share request.')] | Yes | — | |
target_model_name | Annotated[str, Field(description='Name of the local model to import the shared model file into.')] | Yes | — | |
target_script_name | Annotated[str, Field(description='Name to use for the imported model file in the target model.')] | No | '' | |
expected_sha | Annotated[str, Field(description='Current Gitea blob SHA of the target file. Required when the target path already exists — omitting it returns a conflict error with the current SHA and a recovery hint. Ignored for first-time writes to a new path.')] | No | '' | |
target_workspace_id | `Annotated[str | None, Field(description=“Optional UUID of a workspace other than your current one to accept the share into. Omit to use your current workspace. Must match the request’s target tenant. Cross-workspace targeting requires an active membership in that workspace and is only available to OAuth/JWT sessions — API tokens stay scoped to their issuing workspace. The response echoes target_workspace_id so you can reuse it on follow-up calls.”)]` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
request_id(string)status(string)target_model(string)target_script(string)target_path(string)source_commit_sha(string)target_commit_sha(string)accepted_at(string)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "accept_model_share_request", "arguments": { "request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "target_model_name": "forecasts", "target_script_name": "acme_revenue_forecast" }}Response
Section titled “Response”{ "request_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", "status": "accepted", "target_model": "forecasts", "target_script": "acme_revenue_forecast", "target_path": "model/acme_revenue_forecast.py", "source_commit_sha": "abc1234def5678901234567890abcdef12345678", "target_commit_sha": "0123456789abcdef0123456789abcdef01234567", "accepted_at": "2026-04-28T10:00:00+00:00"}- Module:
Sharing - Requires authentication via API token or Auth0 JWT.