Weavers / MCP documentation
Propose a source change
Save a replacement strategy.py proposal for the owner to compare and apply.
Required permission: weavers.python_source.propose
Try asking
Propose a clearer strategy.py implementation and explain the changes. Leave it for me to review in Weavers.How it works
- Creates a stored proposal. The current source file stays unchanged until the owner applies it in Weavers.
- Provide the complete replacement source, a reason, and the exact context revisions. Source is bounded to 512 KiB of UTF-8 text, with no null bytes or unpaired surrogates.
- If no source exists, use baseSourceRevision: 0 and baseSourceSha256: null. Dataset ID/hash and draft ID/revision must each be supplied together or both null.
- Use a new proposal UUID for a new proposal. Identical retries reuse the existing proposal; changed content with the same ID is rejected.
- If the context changes, refresh it and prepare a new proposal. The returned URL opens the implementation review.
Inputs
| Field | Required | Type & constraints |
|---|---|---|
| proposalId | Required | UUID string |
| strategyId | Required | UUID string |
| strategyRevision | Required | integer; greater than 0 |
| baseSourceRevision | Required | integer; minimum 0 |
| baseSourceSha256 | Required | string; 64 lowercase hexadecimal characters or null |
| datasetVersionId | Required | UUID string or null |
| datasetSha256 | Required | string; 64 lowercase hexadecimal characters or null |
| experimentDraftId | Required | UUID string or null |
| experimentDraftRevision | Required | integer; greater than 0 or null |
| source | Required | string; at least 1 characters; up to 524288 characters |
| reason | Required | string; at least 1 characters; up to 2000 characters |
View complete input JSON schema
Input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"proposalId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"strategyId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"strategyRevision": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"baseSourceRevision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"baseSourceSha256": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
{
"type": "null"
}
]
},
"datasetVersionId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"datasetSha256": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
{
"type": "null"
}
]
},
"experimentDraftId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
},
"experimentDraftRevision": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"source": {
"type": "string",
"minLength": 1,
"maxLength": 524288
},
"reason": {
"type": "string",
"minLength": 1,
"maxLength": 2000
}
},
"required": [
"proposalId",
"strategyId",
"strategyRevision",
"baseSourceRevision",
"baseSourceSha256",
"datasetVersionId",
"datasetSha256",
"experimentDraftId",
"experimentDraftRevision",
"source",
"reason"
],
"additionalProperties": false
}What comes back
| Field | Description |
|---|---|
| proposalId, strategyId, sourceSha256 | String identifiers and SHA-256 of the proposed source. |
| status | Stored proposal status; pending for a new proposal. |
| created | Boolean. Whether this call created the proposal. |
| applied, readyToRun | Both false in this tool response. |
| url | Relative Weavers URL for reviewing the proposal. |
This table describes the decoded tool result. MCP wraps it in text content and, for object results, structuredContent.
Worked example
Fictional data. Replace identifiers, revisions and hashes with values from your own Weavers workflow.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "propose_python_source",
"arguments": {
"proposalId": "55555555-5555-4555-8555-555555555555",
"strategyId": "11111111-1111-4111-8111-111111111111",
"strategyRevision": 3,
"baseSourceRevision": 0,
"baseSourceSha256": null,
"datasetVersionId": null,
"datasetSha256": null,
"experimentDraftId": null,
"experimentDraftRevision": null,
"source": "# Draft implementation for review.\n",
"reason": "Start a clearly documented implementation."
}
}
}Decoded result
{
"proposalId": "55555555-5555-4555-8555-555555555555",
"strategyId": "11111111-1111-4111-8111-111111111111",
"sourceSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "pending",
"created": true,
"applied": false,
"readyToRun": false,
"url": "/eureka?strategy=11111111-1111-4111-8111-111111111111§ion=build&pythonView=implementation"
}If the request fails
- Sign in and grant
weavers.python_source.proposebefore calling this tool. - Use resources you can access and refresh revision information when it changes.
- Check
result.isErroreven when HTTP returns 200.