Convert custom tool examples to subdirectory/index.ts structure

- hello.ts → hello/index.ts
- question.ts → question/index.ts
- todo.ts → todo/index.ts
- subagent/subagent.ts → subagent/index.ts
This commit is contained in:
Mario Zechner 2025-12-19 04:52:05 +01:00
parent 320556dbf5
commit a930eb8489
4 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,20 @@
import { Type } from "@sinclair/typebox";
import type { CustomToolFactory } from "@mariozechner/pi-coding-agent";
const factory: CustomToolFactory = (pi) => ({
name: "hello",
label: "Hello",
description: "A simple greeting tool",
parameters: Type.Object({
name: Type.String({ description: "Name to greet" }),
}),
async execute(toolCallId, params) {
return {
content: [{ type: "text", text: `Hello, ${params.name}!` }],
details: { greeted: params.name },
};
},
});
export default factory;