Skip to content

Commit e56c6fe

Browse files
committed
update docs to remove unused tools + add new filesystem tools
1 parent f8183ad commit e56c6fe

File tree

3 files changed

+57
-76
lines changed

3 files changed

+57
-76
lines changed

content/docs/features/core-tools.mdx

Lines changed: 36 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -7,83 +7,62 @@ These tools defined in the [core_tools](https://github.com/ServiceStack/llms/blo
77

88
See [Tools Docs](/docs/extensions/tools) for details on registering and using your own tools.
99

10-
## Memory Tools
11-
12-
Functions for persistent key-value storage.
13-
14-
### `memory_read(key: str) -> Any`
15-
16-
Read a value from persistent memory.
17-
18-
- **key**: The key to retrieve.
19-
20-
### `memory_write(key: str, value: Any) -> bool`
21-
22-
Write a value to persistent memory.
23-
24-
- **key**: The storage key.
25-
- **value**: The value to store.
26-
27-
## File System Tools
28-
29-
All file system operations are restricted to the current working directory for safety.
30-
31-
### `read_file(path: str) -> str`
32-
33-
Read a text file from disk.
34-
35-
- **path**: Relative path to the file.
36-
37-
### `write_file(path: str, content: str) -> bool`
38-
39-
Write text to a file (overwrites existing content).
40-
41-
- **path**: Relative path to the file.
42-
- **content**: Text content to write.
10+
## Math & Logic
4311

44-
### `list_directory(path: str) -> str`
12+
### `calc(expression: str) -> str`
4513

46-
List directory contents including file names, sizes, and modification times.
14+
Evaluate a mathematical expression. Supports arithmetic, comparison, boolean operators, and common math functions.
4715

48-
- **path**: Relative path to the directory.
16+
- **expression**: The mathematical expression string (e.g., `sqrt(16) + 5`).
4917

50-
### `glob_paths(pattern: str, extensions: List[str] = None, sort_by: str = "path", max_results: int = 100) -> Dict`
18+
## Utilities
5119

52-
Find files and directories matching a glob pattern.
20+
### `get_current_time(tz_name: str = None) -> str`
5321

54-
- **pattern**: Glob pattern to match.
55-
- **extensions**: Optional list of file extensions to filter by.
56-
- **sort_by**: Sort criteria ("path", "modified", "size").
57-
- **max_results**: Maximum number of results to return.
22+
Get the current time in ISO-8601 format.
5823

59-
## Search Tools
24+
- **tz_name**: Optional timezone name (e.g., 'America/New_York'). Defaults to UTC.
6025

61-
### `semantic_search(query: str, top_k: int = 5) -> List[Dict]`
26+
## Code Execution Tools
6227

63-
Perform a semantic search (currently a placeholder implementation).
28+
LLMS includes a suite of tools for executing code in various languages within a sandboxed environment. These tools are designed to allow the agent to run scripts, perform calculations, and verify logic safely.
6429

65-
- **query**: The search query string.
66-
- **top_k**: Number of top results to return.
30+
## File System Tools
6731

68-
## Math & Logic
32+
The built-in [computer](https://github.com/ServiceStack/llms/tree/main/llms/extensions/computer) extension [filesystem.py](https://github.com/ServiceStack/llms/blob/main/llms/extensions/computer/filesystem.py) tools provide a native Python implementation of Anthropic's node.js [Filesystem MCP Server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem) tools:
6933

70-
### `calc(expression: str) -> str`
34+
* `read_text_file` - Read complete contents of a file as text
35+
* `read_media_file` - Read an image or audio file
36+
* `read_multiple_files` - Read multiple files simultaneously
37+
* `write_file` - Create new file or overwrite existing (exercise caution with this)
38+
* `edit_file` - Make selective edits using advanced pattern matching and formatting
39+
* `create_directory` - Create new directory or ensure it exists
40+
* `list_directory` - List directory contents with [FILE] or [DIR] prefixes
41+
* `list_directory_with_sizes` - List directory contents with [FILE] or [DIR] prefixes, including file sizes
42+
* `move_file` - Move or rename files and directories
43+
* `search_files` - Recursively search for files/directories that match or do not match patterns
44+
* `directory_tree` - Get recursive JSON tree structure of directory contents
45+
* `get_file_info` - Get detailed file/directory metadata
46+
* `list_allowed_directories` - List all directories the server is allowed to access
7147

72-
Evaluate a mathematical expression. Supports arithmetic, comparison, boolean operators, and common math functions.
48+
<Screenshot src="/img/tools/tool-files.webp" />
7349

74-
- **expression**: The mathematical expression string (e.g., `sqrt(16) + 5`).
50+
## Computer Use
7551

76-
## Utilities
52+
The built-in [computer](https://github.com/ServiceStack/llms/tree/main/llms/extensions/computer) extension transforms AI agents into autonomous computer operators. Based on [Anthropic's computer use tools](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo), it enables agents to see your screen, control the mouse and keyboard, execute shell commands, and edit files - just like a human sitting at the computer.
7753

78-
### `get_current_time(tz_name: str = None) -> str`
54+
This unlocks powerful capabilities that traditional API-based tools cannot achieve:
7955

80-
Get the current time in ISO-8601 format.
56+
- **Visual Verification**: Confirm that code actually renders correctly in a browser
57+
- **Desktop Automation**: Control any GUI application - web browsers, IDEs, terminals
58+
- **End-to-End Workflows**: Chain together multiple applications in a single task
59+
- **Legacy Applications**: Automate software that lacks APIs
8160

82-
- **tz_name**: Optional timezone name (e.g., 'America/New_York'). Defaults to UTC.
61+
For example, an agent can write a web application, open a browser, and capture a screenshot to prove it works:
8362

84-
## Code Execution Tools
63+
<Screenshot src="/img/tools/computer_use_tetris.webp" />
8564

86-
LLMS includes a suite of tools for executing code in various languages within a sandboxed environment. These tools are designed to allow the agent to run scripts, perform calculations, and verify logic safely.
65+
See the [Computer Use](/docs/extensions/computer_use) docs for complete usage details.
8766

8867
## Supported Languages
8968

content/docs/v3.mdx

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -525,24 +525,6 @@ For [Omarchy](https://omarchy.org) users, the [Omarchy MCP](/docs/mcp/omarchy_mc
525525

526526
The built-in [core_tools](https://github.com/ServiceStack/llms/blob/main/llms/extensions/core_tools/__init__.py) extension provides essential functionality for LLMs to interact with their environment, perform calculations, and manage persistent data.
527527

528-
### Memory Tools
529-
530-
Functions for persistent key-value storage.
531-
532-
* `memory_read` - Read a value from persistent memory.
533-
* `memory_write` - Write a value to persistent memory.
534-
535-
### File System Tools
536-
537-
All file system operations are restricted to the current working directory for safety.
538-
539-
* `read_file` - Read a text file from disk.
540-
* `write_file` - Write text to a file (overwrites existing content).
541-
* `list_directory` - List directory contents including file names, sizes, and modification times.
542-
* `glob_paths` - Find files and directories matching a glob pattern.
543-
544-
<Screenshot src="/img/tools/tool-files.webp" />
545-
546528
### Utilities
547529

548530
* `get_current_time` - Get the current time in ISO-8601 format.
@@ -577,9 +559,29 @@ LLMS includes a suite of tools for executing code in various languages within a
577559
'Run C#': '/img/tools/tool-csharp.webp',
578560
}} />
579561

562+
## File System Tools
563+
564+
The built-in [computer](https://github.com/ServiceStack/llms/tree/main/llms/extensions/computer) extension [filesystem.py](https://github.com/ServiceStack/llms/blob/main/llms/extensions/computer/filesystem.py) tools provide a native Python implementation of Anthropic's node.js [Filesystem MCP Server](https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem) tools which allow LLMs to interact with the local file system in a safe and controlled manner enabling reading, writing, and searching of allowed files and directories only.
565+
566+
* `read_text_file` - Read complete contents of a file as text
567+
* `read_media_file` - Read an image or audio file
568+
* `read_multiple_files` - Read multiple files simultaneously
569+
* `write_file` - Create new file or overwrite existing (exercise caution with this)
570+
* `edit_file` - Make selective edits using advanced pattern matching and formatting
571+
* `create_directory` - Create new directory or ensure it exists
572+
* `list_directory` - List directory contents with [FILE] or [DIR] prefixes
573+
* `list_directory_with_sizes` - List directory contents with [FILE] or [DIR] prefixes, including file sizes
574+
* `move_file` - Move or rename files and directories
575+
* `search_files` - Recursively search for files/directories that match or do not match patterns
576+
* `directory_tree` - Get recursive JSON tree structure of directory contents
577+
* `get_file_info` - Get detailed file/directory metadata
578+
* `list_allowed_directories` - List all directories the server is allowed to access
579+
580+
<Screenshot src="/img/tools/tool-files.webp" />
581+
580582
## Computer Use
581583

582-
The built-in [computer_use](https://github.com/ServiceStack/llms/tree/main/llms/extensions/computer) extension transforms AI agents into autonomous computer operators. Based on [Anthropic's computer use tools](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo), it enables agents to see your screen, control the mouse and keyboard, execute shell commands, and edit files - just like a human sitting at the computer.
584+
The built-in [computer](https://github.com/ServiceStack/llms/tree/main/llms/extensions/computer) extension transforms AI agents into autonomous computer operators. Based on [Anthropic's computer use tools](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo), it enables agents to see your screen, control the mouse and keyboard, execute shell commands, and edit files - just like a human sitting at the computer.
583585

584586
This unlocks powerful capabilities that traditional API-based tools cannot achieve:
585587

public/img/tools/tool-files.webp

35.9 KB
Loading

0 commit comments

Comments
 (0)