Properly log function-based tool calls in your AI agent traces
Ensure function-based tool calls are properly logged and traced within your AI agent workflows. The @tool decorator helps capture tool usage patterns and performance metrics.
Tool Decoration
Wrap your custom tools with the @tool decorator to ensure they appear in traces.
from atla_insights import tool@tooldef get_weather(location: str) -> str: """Get current weather for a location""" response = weather_api.get_current(location) return f"Weather in {location}: {response.condition}, {response.temperature}°F"
coming soon...
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Atla","colors":{"primary":"#3e958b","light":"#FFF","dark":"#161616"},"logo":{"light":"https://mintcdn.com/atla/rWxTyQPfY6qLxNXQ/assets/logo/atla_dark.svg?fit=max\u0026auto=format\u0026n=rWxTyQPfY6qLxNXQ\u0026q=85\u0026s=bd12ca23e38bf2d602c24e430792b3dd","dark":"https://mintcdn.com/atla/rWxTyQPfY6qLxNXQ/assets/logo/atla_light.svg?fit=max\u0026auto=format\u0026n=rWxTyQPfY6qLxNXQ\u0026q=85\u0026s=16e7f123cfa1a0bdefa2b66e72b9e6d6"},"favicon":"/assets/favicon.png","api":{"openapi":"api-reference/openapi.yaml","playground":{"display":"simple"}},"footer":{"socials":{"website":"https://www.atla-ai.com","linkedin":"https://www.linkedin.com/company/atla-ai/","discord":"https://discord.gg/qFCMgkGwUK","x":"https://x.com/Atla_AI","github":"https://github.com/atla-ai"}},"integrations":{"gtm":{"tagId":"GTM-K85C88TZ"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Python SDK","icon":"python","href":"https://github.com/atla-ai/atla-insights-sdk"},{"anchor":"JS/TS SDK","icon":"square-js","href":"https://github.com/atla-ai/atla-insights-sdk-js"},{"anchor":"Contact Us","icon":"calendar","href":"https://calendly.com/d/csym-9kk-bbk/insights-ui-onboarding"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"atla","hasAudioNarration":false,"actualSubdomain":"atla","customDomains":["docs.atla-ai.com"],"gitSource":{"type":"github","owner":"atla-ai","repo":"atla-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae9206e429ca336c4383392:success","clientVersion":"0.0.4336","searchFilterCounts":[{"language":"default","tag":"Documentation","count":18},{"language":"default","tag":"Tracing","count":7},{"language":"default","tag":"API Reference","count":6},{"language":"default","tag":"Data API Reference","count":6},{"language":"default","tag":"Get Started","count":5},{"language":"default","tag":"Integrations","count":3},{"language":"default","tag":"Security","count":3},{"language":"default","tag":"Traces","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"tracing/tool-invocations","slug":"/tracing/tool-invocations","pageMetadata":{"title":"Tool Invocations","description":"Properly log function-based tool calls in your AI agent traces","href":"/tracing/tool-invocations"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Properly log function-based tool calls in your AI agent traces\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Ensure function-based tool calls are properly logged and traced within your AI agent workflows. The `,_jsx(_components.code,{children:`@tool`}),` decorator helps capture tool usage patterns and performance metrics.`]}),`\n`,_jsx(Heading,{level:`2`,id:`tool-decoration`,children:`Tool Decoration`}),`\n`,_jsxs(_components.p,{children:[`Wrap your custom tools with the `,_jsx(_components.code,{children:`@tool`}),` decorator to ensure they appear in traces.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:``,icon:`python`,lines:`true`,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus has-diff`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` atla_insights `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tool`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line line-diff line-add`,children:_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@tool`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` get_weather`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Get current weather for a location\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` weather_api.get_current(location)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Weather in `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`location`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.condition`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`°F\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:``,icon:`square-js`,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`coming soon...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Tool Invocations","description":"Properly log function-based tool calls in your AI agent traces","href":"/tracing/tool-invocations"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Tool Decoration","slug":"tool-decoration","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"atla","siteName":"Atla","title":"Tool Invocations - Atla","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-10-16T14:33:33.898Z","originalFileLocation":"tracing/tool-invocations.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Properly log function-based tool calls in your AI agent traces\">\u003cmeta data-mint-head name=\"application-name\" content=\"Atla\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Tool Invocations - Atla\">\u003cmeta data-mint-head property=\"og:description\" content=\"Properly log function-based tool calls in your AI agent traces\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Atla\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.atla-ai.com/tracing/tool-invocations\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://atla.mintlify.site/_mintlify/api/og/v2?division=Tracing\u0026amp;title=Tool+Invocations\u0026amp;description=Properly+log+function-based+tool+calls+in+your+AI+agent+traces\u0026amp;theme=a2a151d2576622f8d91fd3cf\u0026amp;signature=4eacd68bcb43e270176977cd26f4feab6b568fb545286d81c263392f271c947c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Tool Invocations - Atla\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Properly log function-based tool calls in your AI agent traces\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://atla.mintlify.site/_mintlify/api/og/v2?division=Tracing\u0026amp;title=Tool+Invocations\u0026amp;description=Properly+log+function-based+tool+calls+in+your+AI+agent+traces\u0026amp;theme=a2a151d2576622f8d91fd3cf\u0026amp;signature=4eacd68bcb43e270176977cd26f4feab6b568fb545286d81c263392f271c947c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/atla/thh4Nv6Yq_cghXvb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Atla\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3e958b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.atla-ai.com/tracing/tool-invocations\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/tracing/tool-invocations.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.atla-ai.com/#organization\",\"name\":\"Atla\",\"url\":\"https://docs.atla-ai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/atla/rWxTyQPfY6qLxNXQ/assets/logo/atla_dark.svg?fit=max\u0026auto=format\u0026n=rWxTyQPfY6qLxNXQ\u0026q=85\u0026s=bd12ca23e38bf2d602c24e430792b3dd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.atla-ai.com#website\",\"name\":\"Atla\",\"url\":\"https://docs.atla-ai.com\",\"publisher\":{\"@id\":\"https://docs.atla-ai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.atla-ai.com/tracing/tool-invocations#webpage\",\"url\":\"https://docs.atla-ai.com/tracing/tool-invocations\",\"name\":\"Tool Invocations\",\"description\":\"Properly log function-based tool calls in your AI agent traces\",\"dateModified\":\"2025-10-16T14:33:33.898Z\",\"isPartOf\":{\"@id\":\"https://docs.atla-ai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.atla-ai.com/tracing/tool-invocations#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.atla-ai.com/tracing/tool-invocations#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tracing\",\"item\":\"https://docs.atla-ai.com/tracing/advanced-instrumentation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tool Invocations\",\"item\":\"https://docs.atla-ai.com/tracing/tool-invocations\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.atla-ai.com/tracing/tool-invocations#article\",\"headline\":\"Tool Invocations\",\"name\":\"Tool Invocations\",\"description\":\"Properly log function-based tool calls in your AI agent traces\",\"url\":\"https://docs.atla-ai.com/tracing/tool-invocations\",\"mainEntityOfPage\":{\"@id\":\"https://docs.atla-ai.com/tracing/tool-invocations#webpage\"},\"dateModified\":\"2025-10-16T14:33:33.898Z\",\"publisher\":{\"@id\":\"https://docs.atla-ai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.atla-ai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Atla\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Atla\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/tracing/tool-invocations.md","siteName":"Atla","nav":{"global":{"anchors":[{"anchor":"Python SDK","icon":"python","href":"https://github.com/atla-ai/atla-insights-sdk"},{"anchor":"JS/TS SDK","icon":"square-js","href":"https://github.com/atla-ai/atla-insights-sdk-js"},{"anchor":"Contact Us","icon":"calendar","href":"https://calendly.com/d/csym-9kk-bbk/insights-ui-onboarding"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Overview","href":"/overview"},{"title":"Quickstart","href":"/quickstart"},{"title":"AI-Assisted Integration","href":"/ai-integration"},{"title":"Platform Comparison","href":"/comparison"},{"title":"Troubleshooting \u0026 FAQ","href":"/troubleshooting-faq"}]},{"group":"Integrations","pages":[{"title":"Python Integrations","href":"/integrations/python"},{"title":"TypeScript Integrations","href":"/integrations/typescript"},{"title":"Coding agents","href":"/integrations/coding-agents"}]},{"group":"Tracing","pages":[{"title":"Advanced Instrumentation","href":"/tracing/advanced-instrumentation"},{"title":"Custom Metrics","href":"/tracing/custom-metrics"},{"title":"Metadata","href":"/tracing/metadata"},{"title":"Experiments","description":"Track experiments to try out new features and resolve existing issues","href":"/tracing/experiments"},{"title":"Tool Invocations","href":"/tracing/tool-invocations"},{"title":"Sampling","description":"Control trace volume in high-throughput scenarios with smart sampling strategies","href":"/tracing/sampling"},{"title":"Multimodal","href":"/tracing/multimodal"}]},{"group":"Security","pages":[{"title":"Data privacy","href":"/security/trust"},{"title":"Privacy policy","url":"https://www.atla-ai.com/privacy-policy","href":"/security/privacy-policy"},{"title":"Terms of service","url":"https://www.atla-ai.com/terms-of-service","href":"/security/terms-of-service"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"}]}]},"basePath":"","title":"Tool Invocations - Atla","deploymentId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","buildId":"dpl_9bQLTw9nc2h9csDGYcKwWenPcQWn","dynamics":[],"chunks":[]}