{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/api-reference/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["api-container","endpoint"]},"redocly_category":"API Reference","searchWeight":120,"type":"markdown"},"seo":{"title":"Fetch a tool call's full result on a shared thread","description":"Complete API reference and documentation for Freddy AI-powered backend system by Aitronos","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"fetch-a-tool-calls-full-result-on-a-shared-thread","__idx":0},"children":["Fetch a tool call's full result on a shared thread"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The share-link twin of ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/threads/get-tool-call-result"},"children":["Fetch a tool call's full result"]},". Returns the complete, untruncated ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]}," of one stored tool call to a recipient reading the thread through a share link."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Rendered ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tool_call"]}," blocks inline a result only up to a byte budget (32 KiB by default) and mark the cut with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_truncated: true"]}," plus a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_bytes"]}," giving the full size. This endpoint serves the rest, once, when the recipient expands the block."]},{"$$mdtype":"Tag","name":"ApiContainer","attributes":{},"children":[{"$$mdtype":"Tag","name":"Endpoint","attributes":{"method":"GET","path":"https://api.aitronos.com/v1/shared-threads/{slug}/messages/{message_id}/tool-calls/{tool_call_id}/result"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentication","__idx":1},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["User authentication only"]}," (Bearer token). A share link is resolved against a recipient, and an API key has no recipient — an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["x-api-key"]}," request is rejected with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]},", exactly as on every other ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/shared-threads"]}," route."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authorization is otherwise identical to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread-messages"},"children":["Get shared thread messages"]},": the link must exist, be unrevoked and unexpired, and resolve for the calling user (active member of the owning organization, with an explicit grant). Anything else is a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," — an unknown slug and a revoked one are indistinguishable."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As on the owner surface, a message the shared message list would not show, and a tool call it would not draw a block for, are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}," here too — as is a record holding no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]}," field at all (a failed call, or a card still awaiting approval). A call that succeeded and returned nothing is not in that set: a stored ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"\""]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," comes back as a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," carrying that value with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_bytes: 0"]},", matching the block, which shows the same empty value with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_truncated: false"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"path-parameters","__idx":2},"children":["Path Parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["slug"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The share-link slug, taken from the share URL. The slug alone identifies the thread; a thread id is neither needed nor accepted."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The message the tool call belongs to (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["msg_"]}," prefix). Must be on the thread the slug resolves to."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tool_call_id"]}]}," string ",{"$$mdtype":"Tag","name":"em","attributes":{"style":{"color":"#ef4444 !important","fontWeight":"600 !important","fontStyle":"normal !important"}},"children":["required"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The tool call's identifier, taken from the block's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," (equivalently ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tool_call_id"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note the path segment is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tool-calls"]},", hyphenated."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returns","__idx":3},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}," with the same body as the owner surface:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message_id"]}]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — The message the tool call belongs to (echoed)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tool_call_id"]}]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — The tool call's identifier (echoed)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tool_name"]}]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," — The tool that produced the result."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]}]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["any"]}," — The stored result in full."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_bytes"]}]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["integer"]}," — Size of the STORED result in UTF-8 bytes, matching the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result_bytes"]}," on the block you expanded. Measured before the vendor-term substitution every message read applies, so it answers \"is this the whole value\" rather than serving as a checksum of the bytes you received."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"code-examples","__idx":4},"children":["Code Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"curl","__idx":5},"children":["cURL"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl https://api.aitronos.com/v1/shared-threads/sh_7d21c/messages/msg_1a2b/tool-calls/call_119041/result \\\n  -H \"Authorization: Bearer YOUR_TOKEN\" \\\n  -H \"Accept-Encoding: gzip\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-sdk","__idx":6},"children":["Python SDK"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from aitronos import Aitronos  # pip install aitronos-sdk\n\nclient = Aitronos(access_token=\"your-user-token\")\nfull = client.shared_threads.get_tool_call_result(\n    slug=\"sh_7d21c\",\n    message_id=\"msg_1a2b\",\n    tool_call_id=\"call_119041\",\n)\nprint(full.tool_name, full.result_bytes)\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"python-requests","__idx":7},"children":["Python (requests)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"import requests\n\nresp = requests.get(\n    \"https://api.aitronos.com/v1/shared-threads/sh_7d21c/messages/msg_1a2b\"\n    \"/tool-calls/call_119041/result\",\n    headers={\"Authorization\": \"Bearer YOUR_TOKEN\"},\n)\nbody = resp.json()\n# result_bytes is measured on the STORED value, before the vendor-term\n# substitution every message read applies — so treat it as \"is this the whole\n# value\" rather than as a checksum. On the rare row where a term is rewritten,\n# the delivered string can differ from result_bytes by a few bytes.\nassert len(body[\"result\"].encode()) >= body[\"result_bytes\"] - 64\n","lang":"python"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"javascript","__idx":8},"children":["JavaScript"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const resp = await fetch(\n  \"https://api.aitronos.com/v1/shared-threads/sh_7d21c/messages/msg_1a2b\" +\n    \"/tool-calls/call_119041/result\",\n  { headers: { Authorization: \"Bearer YOUR_TOKEN\" } },\n);\nconst body = await resp.json();\nconsole.log(body.tool_name, body.result_bytes);\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"response-example","__idx":9},"children":["Response Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"message_id\": \"msg_1a2b3c4d5e6f7081920a1b2c3d4e5f60\",\n  \"tool_call_id\": \"call_119041\",\n  \"tool_name\": \"search_knowledge\",\n  \"result\": \"…the whole stored value…\",\n  \"result_bytes\": 481570\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"error-responses","__idx":10},"children":["Error Responses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An API key, or any other non-user credential:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INSUFFICIENT_PERMISSIONS\",\n    \"message\": \"Share links can only be opened with user authentication\",\n    \"type\": \"client_error\",\n    \"status\": 403,\n    \"details\": {\"auth_method\": \"api_key\"},\n    \"trace_id\": \"trc_example\",\n    \"timestamp\": \"2026-09-02T12:00:00Z\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An unknown, revoked or expired link, or one not granted to this user:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"RESOURCE_NOT_FOUND\",\n    \"message\": \"Shared thread not found\",\n    \"type\": \"client_error\",\n    \"status\": 404,\n    \"details\": {\"slug\": \"sh_7d21c\"},\n    \"trace_id\": \"trc_example\",\n    \"timestamp\": \"2026-09-02T12:00:00Z\"\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-resources","__idx":11},"children":["Related Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread-messages"},"children":["Get shared thread messages"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/threads/get-tool-call-result"},"children":["Fetch a tool call's full result"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/check-source"},"children":["Check source on a shared thread"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/shared-threads/get-shared-thread-turns"},"children":["Get shared thread turns"]}]}]}]},"headings":[{"value":"Fetch a tool call's full result on a shared thread","id":"fetch-a-tool-calls-full-result-on-a-shared-thread","depth":1},{"value":"Authentication","id":"authentication","depth":2},{"value":"Path Parameters","id":"path-parameters","depth":2},{"value":"Returns","id":"returns","depth":2},{"value":"Code Examples","id":"code-examples","depth":2},{"value":"cURL","id":"curl","depth":3},{"value":"Python SDK","id":"python-sdk","depth":3},{"value":"Python (requests)","id":"python-requests","depth":3},{"value":"JavaScript","id":"javascript","depth":3},{"value":"Response Example","id":"response-example","depth":2},{"value":"Error Responses","id":"error-responses","depth":2},{"value":"Related Resources","id":"related-resources","depth":2}],"frontmatter":{"title":"Fetch a tool call's full result on a shared thread","seo":{"title":"Fetch a tool call's full result on a shared thread"}},"lastModified":"2026-10-26T18:32:31.653Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/api-reference/shared-threads/get-shared-tool-call-result","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}