https://linen.dev logo
zoho list item tool bug
# 🖥│support-forum
n
Hi, Tool name: ZOHO_BOOKS_LIST_ITEMS There's a bug where the model is by default adding 0 for search criteria: "rate":0,"rate_greater_equals":0,"rate_greater_than":0,"rate_less_equals":0,"rate_less_than":0 This is causing issue as the items Zoho returns is null as it adds 0 as filter for each. Please fix this at the earliest. Thank You!
u
Hey @Napolean_Solo, could you share your logId? It'll help us in debugging.
n
@Uday log_otacxSmwH6jU As you can see, model is adding 0 as default when it should be null. I think you need to change the default values in the schema to null instead of 0 as no amount of prompting is forcing the model to not add 0 as default or leave it empty.
u
Hey @Napolean_Solo, we do not have any default values for the field
rate
and it's completely optional(will defaults to null if not passed). You can use this api ref to check the schema: https://docs.composio.dev/reference/api-reference/tools/getToolsByToolSlug. The agent might be passing the value explicitly, could you check if this is consistent behaviour and lmk?
n
@Uday , i am using the latest GPT model with thinking. I have prompted in every way to stop the model from adding default values but it still is adding 0 for all search criteria "rate":0,"rate_greater_equals":0,"rate_greater_than":0,"rate_less_equals":0,"rate_less_than":0
I can see that the type is 'number' that explains the issue, can you guys change it to string and in the description ask for number? Because the model is adding 0 as default value. The models are strictly trained to follow the schema and won't leave blank unless explicitly stated in schema and fields of type 'number' cannot be left blank unless explicitly mentioned in the schema otherwise it becomes invalid. This behaviour is causing lot of issues. Can you guys rectify the issue by changing it to string?
Just to reiterate, the default behaviour for type: number is to add 0 and not null/None as you are expecting. In the schema it isn't explicitly mentioned that it is required but also not mentioned as optional either.
u
@Napolean_Solo, anything which is not marked as required is optional by behaviour. We also tried the tool with the OpenAI model and it appears that the LLM successfully omitted the optional fields. https://cdn.discordapp.com/attachments/1473277100302667922/1473711277216895159/image.png?ex=69973414&is=6995e294&hm=1de02a0c8967a93b0e8bb4355fb818d370efd6330f889e07865322e238ae86c7&
n
That’s strange in my case it always calls with all properties
@Uday can you ask it to fetch a specific item?
u
Hey @Napolean_Solo, currently we are using this snippet, you can try using it:
Copy code
import asyncio
import os
from typing import Any, cast
from agents import Agent, Runner
from composio import Composio
from composio_openai_agents import OpenAIAgentsProvider

user_id = "<user-id>"

composio = Composio(
    provider=OpenAIAgentsProvider(),
    api_key="<composio-api-key>",
    toolkit_versions={"zoho_books": "20260211_00"},
)

tools = composio.tools.get(
    user_id=user_id,
    tools=["ZOHO_BOOKS_LIST_ITEMS"],
)
agent = Agent(
    name="Deep Researcher",
    instructions=(
        "You are an investigative journalist. Use the ZOHO_BOOKS_LIST_ITEMS tool when asked to get or list Zoho Books items; do not refuse or say you lack access—call the tool with the given organization_id."
    ),
    tools=cast(Any, tools),
    model="gpt-5.2",
)

async def main():
    result = await Runner.run(
        starting_agent=agent,
        input=("get ZOHO_BOOKS_LIST_ITEMS for organization_id <id>"),
    )
    print(result)

asyncio.run(main())
Or Alternatively, you can use tool-router: https://docs.composio.dev/docs/quickstart
2 Views