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
@@ -40,6 +41,9 @@ cargo run --bin cratedocs http --debug
40
41
41
42
### Directly Testing Documentation Tools
42
43
44
+
# Enumerate crate items
45
+
cargo run --bin cratedocs test --tool list_crate_items --crate-name serde --version 1.0.0 --item-type struct
46
+
cargo run --bin cratedocs test --tool list_crate_items --crate-name tokio --version 1.28.0 --visibility pub --module tokio::sync
43
47
You can directly test the documentation tools from the command line without starting a server:
44
48
45
49
```bash
@@ -189,47 +193,38 @@ in `mcp_settings.json`
189
193
```
190
194
191
195
192
-
## License
193
-
194
-
MIT License
195
196
196
-
##MCP Tool:`list_crate_items`
197
+
### 4.`list_crate_items`
197
198
198
-
The `list_crate_items` tool enumerates all items in a specified Rust crate and version, optionally filtering by item type, visibility, or module path. This is useful for quickly exploring the structure of a crate, generating concise listings for LLMs, or programmatically analyzing crate APIs.
199
+
Enumerates all items in a specified Rust crate and version, optionally filtering by item type, visibility, or module path. Useful for exploring crate structure, generating concise listings for LLMs, or programmatically analyzing crate APIs.
199
200
200
-
### Usage
201
+
**Parameters:**
202
+
-`crate_name` (required): The name of the crate
203
+
-`version` (required): The version of the crate
204
+
-`item_type` (optional): Filter by item type (struct, enum, trait, fn, macro, mod)
205
+
-`visibility` (optional): Filter by visibility (pub, private)
206
+
-`module` (optional): Filter by module path (e.g., serde::de)
201
207
202
-
```sh
203
-
cargo run --bin cratedocs -- list-crate-items --crate-name serde --version 1.0.0
208
+
**Example:**
209
+
```json
210
+
{
211
+
"name": "list_crate_items",
212
+
"arguments": {
213
+
"crate_name": "serde",
214
+
"version": "1.0.0",
215
+
"item_type": "struct"
216
+
}
217
+
}
204
218
```
205
219
206
-
#### With filters:
207
-
208
-
- Filter by item type (e.g., struct, enum, trait, fn, macro, mod):
0 commit comments