Resource
list-writer
Writer for streaming tool list responses.
resource list-writer;F check-write
check-write: func() -> result<u32, stream-error>;Check readiness for writing. Returns the number of tools that can be written without blocking. When this returns 0, the stream needs to flush before accepting more writes.
F write
write: func(tool: tool) -> result<_, stream-error>;Write a tool definition to the stream.
F close
close: func(options: option<list-tools-result-options>) -> result<_, stream-error>;Close the stream with optional metadata.
F send
send: func(id: id, output: output-stream, tools: list<tool>, options: option<list-tools-result-options>) -> result<_, stream-error>;Send a list of tools as a complete result and close the output stream.
F open
open: func(id: id, output: output-stream, initial: list<tool>) -> result<list-writer, stream-error>;Start the stream of tool definitions.