You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 💭 **Structured Thinking**: Document and validate reasoning about complex operations
99
+
- 🧩 **AI-Optimized Reasoning**: Based on [Anthropic's research](https://www.anthropic.com/engineering/claude-think-tool) on improving LLM problem-solving
100
+
- 📋 **Task Planning**: Break down complex problems into manageable steps
101
+
- ✅ **Policy Compliance**: Verify solutions against project guidelines
102
+
- 🔄 **Tool Output Analysis**: Process results from other tools before taking next actions
103
+
- 📝 **Decision Documentation**: Maintain audit trails of architectural choices
Copy file name to clipboardExpand all lines: docs/tool-reference.md
+145Lines changed: 145 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,151 @@ Simple health check endpoint that returns a greeting message.
245
245
dotnet run --project src/NetContextClient/NetContextClient.csproj -- hello
246
246
```
247
247
248
+
### `think`
249
+
Provides a space for structured thinking during complex operations, allowing AI models to reason about actions, verify compliance with rules, and plan next steps without making any state changes.
250
+
251
+
**Parameters:**
252
+
-`--thought` (required): The thought or reasoning to process
253
+
254
+
**Example:**
255
+
```bash
256
+
dotnet run --project src/NetContextClient/NetContextClient.csproj -- think --thought "Planning to refactor the authentication module to use JWT tokens"
257
+
```
258
+
259
+
**Output Example:**
260
+
```json
261
+
{
262
+
"thought": "Planning to refactor the authentication module to use JWT tokens",
263
+
"message": "Thought processed successfully",
264
+
"category": "Refactoring",
265
+
"timestamp": "2024-03-21T14:30:00.000Z",
266
+
"characterCount": 58
267
+
}
268
+
```
269
+
270
+
**When to Use:**
271
+
The think tool is particularly valuable when you want Claude to:
272
+
1. Break down complex problems into manageable steps
273
+
2. Analyze tool outputs before taking further actions
274
+
3. Verify compliance with project policies and rules
275
+
4. Plan multi-step operations that require careful consideration
276
+
5. Document reasoning about architectural decisions
277
+
278
+
> 📚 **Learn More**: This implementation is based on Anthropic's research on improving Claude's performance with a dedicated thinking space. [Read their detailed blog post](https://www.anthropic.com/engineering/claude-think-tool) for more insights.
279
+
280
+
**Best Practice Examples:**
281
+
282
+
1.**Multi-step Task Planning**
283
+
```
284
+
Before implementing a new feature, use the think tool to:
285
+
- List all required functionality
286
+
- Identify affected components and files
287
+
- Plan the implementation sequence
288
+
- Consider potential edge cases
289
+
- Outline test scenarios
290
+
291
+
Example: When adding authentication, think through: user flow, security requirements, error states, and affected API endpoints.
292
+
```
293
+
294
+
2.**Policy Compliance Verification**
295
+
```
296
+
When evaluating solutions against project guidelines, use the think tool to:
297
+
- List all relevant policies
298
+
- Check each policy requirement against the solution
299
+
- Identify any compliance gaps
300
+
- Document justifications for approach
301
+
- Flag areas needing further review
302
+
303
+
Example: "Before implementing this database change, let me verify it meets our data security policies..."
304
+
```
305
+
306
+
3.**Tool Output Analysis**
307
+
```
308
+
After receiving complex tool outputs (like search results or code analysis), use the think tool to:
309
+
- Summarize key findings
310
+
- Identify patterns across results
311
+
- Connect information from different sources
312
+
- Determine next investigation steps
313
+
- Validate assumptions based on collected data
314
+
315
+
Example: "After searching the codebase for auth-related files, I've found these patterns..."
316
+
```
317
+
318
+
4.**Architectural Decision Documentation**
319
+
```
320
+
When making architectural choices, use the think tool to:
321
+
- Document decision criteria
322
+
- Compare alternative approaches
323
+
- List pros and cons of each option
324
+
- Justify the chosen solution
325
+
- Note implications for future development
326
+
327
+
Example: "Considering three approaches for the caching layer: in-memory, Redis, or database..."
328
+
```
329
+
330
+
**Features:**
331
+
- Automatic thought categorization:
332
+
- Refactoring: Code restructuring and improvements
333
+
- Security: Security-related considerations
334
+
- Performance: Optimization and performance improvements
335
+
- Testing: Testing and debugging thoughts
336
+
- Architecture: Design and architectural decisions
337
+
- General: Other uncategorized thoughts
338
+
- Detailed metadata including timestamps and character counts
339
+
- Content validation for potentially harmful patterns
340
+
- Support for Unicode characters and emoji
341
+
- Automatic log rotation for debugging logs
342
+
343
+
**Limitations and Considerations:**
344
+
- The tool is stateless - it doesn't persist thoughts between invocations
345
+
- No state changes are made to the codebase
346
+
- Maximum thought length is 32KB (32,768 characters)
347
+
- Potentially harmful content is automatically rejected
348
+
- Timestamps are in ISO 8601 format (UTC)
349
+
- Log files are automatically rotated at 5MB
350
+
351
+
**Logging Configuration:**
352
+
Enable thought logging by setting the environment variable:
0 commit comments