How to query available tools for trace/observation? #14826
Replies: 2 comments
|
I don't think the public observation API / Python SDK currently exposes full available-tool schemas as first-class fields. From the current code path, v1 Practical options:
So for Python SDK today, I would not expect |
|
@ValeKnappich The “available tools” you see in the observation view isn’t currently exposed as a dedicated field on the public trace/observation API objects. The UI derives that section by parsing the observation’s input and metadata, and (since v3.143.0) Langfuse also stores extracted tool definitions internally, but those internal fields haven’t been released on the public API yet. This is tracked in #9525, feel free to upvote/subscribe. Since the UI builds the tools list purely from input/metadata, everything you see there is already in the API response, you just need to read it from where your integration wrote it: Depending on the integration, the definitions live in input.tools (OpenAI SDK wrapper), or in metadata.attributes under keys like ai.prompt.tools (Vercel AI SDK), gen_ai.tool.definitions, llm.tools.{N}.tool.json_schema, or model_request_parameters.function_tools (pydantic-ai). |
Uh oh!
There was an error while loading. Please reload this page.
Describe your question
In the observation view in the Langfuse UI, I can see the available tools that are provided to the LLM. When querying data from the API (currently via python sdk), I don't see this information in the trace or observation objects (to be clear, I see tool calls but not the list of available tools and their schemas). Is there any way to access this information via API?
Langfuse Cloud or Self-Hosted?
Self-Hosted
If Self-Hosted
v3.161.00
If Langfuse Cloud
No response
SDK and integration versions
python sdk 4.7.1
Pre-Submission Checklist
All reactions