blob: 4fe35136a49eb34a96ccbe5ef51218619b7eba3f [file] [log] [blame]
Earl Lee2e463fb2025-04-17 11:22:22 -07001package claudetool
2
3import (
4 "context"
5 "encoding/json"
6
Josh Bleecher Snyder4f84ab72025-04-22 16:40:54 -07007 "sketch.dev/llm"
Earl Lee2e463fb2025-04-17 11:22:22 -07008)
9
10// The Think tool provides space to think.
Josh Bleecher Snyder4f84ab72025-04-22 16:40:54 -070011var Think = &llm.Tool{
Earl Lee2e463fb2025-04-17 11:22:22 -070012 Name: thinkName,
13 Description: thinkDescription,
Josh Bleecher Snyder4f84ab72025-04-22 16:40:54 -070014 InputSchema: llm.MustSchema(thinkInputSchema),
Earl Lee2e463fb2025-04-17 11:22:22 -070015 Run: thinkRun,
16}
17
18const (
19 thinkName = "think"
20 thinkDescription = `Think out loud, take notes, form plans. Has no external effects.`
21
22 // If you modify this, update the termui template for prettier rendering.
23 thinkInputSchema = `
24{
25 "type": "object",
26 "required": ["thoughts"],
27 "properties": {
28 "thoughts": {
29 "type": "string",
30 "description": "The thoughts, notes, or plans to record"
31 }
32 }
33}
34`
35)
36
Josh Bleecher Snyder43b60b92025-07-21 14:57:10 -070037func thinkRun(ctx context.Context, m json.RawMessage) llm.ToolOut {
38 return llm.ToolOut{LLMContent: llm.TextContent("recorded")}
Earl Lee2e463fb2025-04-17 11:22:22 -070039}