Skip to content

How do you do zero parameters with zod #443

@qrdlgit

Description

@qrdlgit

Please read this first

The below doesn't work, but nothing else seems to work either.

Question

Describe your question. Provide details if available.

const getSFWeatherTool = tool({
  name: 'get_weather',
  description: 'Get the weather for SF',
  parameters: z.object({}),
  execute: async () => {
    return `The weather in SF is sunny`;
  },
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions