Skip to content

Docs: Point attachment_refs at the pre-signed upload path - #496

Merged
CFDan merged 2 commits into
mainfrom
fix/upload-url-tool-docs
Aug 26, 2026
Merged

Docs: Point attachment_refs at the pre-signed upload path#496
CFDan merged 2 commits into
mainfrom
fix/upload-url-tool-docs

Conversation

@CFDan

@CFDan CFDan commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What

attachment_refs on create_task, update_task, create_comment and create_message described its references as coming from twprojects-create_file alone. A client reading only the parameter schema — the common case — had no indication that a twprojects-create_upload_url reference belonged there, which steers it onto the inline base64 path for files that already exist. The description now names create_upload_url first.

Two smaller corrections in the same file:

  • "tf_1a2b" is not the shape of an issued reference. Where the reference is an input (attachment_refs, add_project_file.reference) the description now gives the real shape; where it is an output (create_file, create_upload_url) the example is dropped, since the value is in the result.
  • create_upload_url told the caller to send the returned headers "adding Content-Length set to size", but the handler already sets Content-Length in the map it returns. It now says to send exactly the headers returned, which is what the usage string already said.

Verification

Tool descriptions only — no behaviour change. go build ./..., go vet and go test ./internal/twprojects/ pass; no test asserted on the description text. All four descriptions were rendered to confirm the substitutions read correctly.

🤖 Generated with Claude Code

The attachment_refs description named create_file as the only source of a
reference, so a client reading the parameter schema on create_task,
update_task, create_comment or create_message had no reason to treat a
create_upload_url reference as valid there. It now names
create_upload_url first, which is the path that keeps file bytes out of
the conversation.

Drop the "tf_1a2b" example, which no issued reference resembles, in
favour of the shape itself where the reference is an input, and remove
the instruction to add Content-Length by hand: the handler already sets
it in the headers it returns, so the description now agrees with the
usage string and tells the caller to send exactly what came back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@CFDan
CFDan requested a review from a team as a code owner August 26, 2026 21:09
@CFDan
CFDan requested a review from rafaeljusto August 26, 2026 21:09
The generated page embeds each tool's first sentence, which the
create_upload_url wording change moved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@CFDan
CFDan merged commit 08ed111 into main Aug 26, 2026
4 checks passed
@CFDan
CFDan deleted the fix/upload-url-tool-docs branch August 26, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants