Skip to content

Commit ed659e0

Browse files
authored
Merge pull request #46 from universal-tool-calling-protocol/dev
📚 Enhance v1.0 Documentation: Add Protocol Guides, Implementation Exa…
2 parents d9dd3f3 + 159694f commit ed659e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+10979
-771
lines changed

docs/api/core/utcp/exceptions/utcp_serializer_validation_error.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ sidebar_label: utcp_serializer_validation_error
99

1010
### class UtcpSerializerValidationError {#utcpserializervalidationerror}
1111

12-
*No class documentation available*
12+
<details>
13+
<summary>Documentation</summary>
14+
15+
Exception raised when a serializer validation fails.
16+
17+
Thrown by serializers when they cannot validate or convert data structures
18+
due to invalid format, missing required fields, or type mismatches.
19+
Contains the original validation error details for debugging.
20+
21+
22+
**Usage**
23+
24+
Typically caught when loading configuration files or processing
25+
external data that doesn't conform to UTCP specifications.
26+
</details>
1327

1428
---
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: filter_dict_post_processor
3+
sidebar_label: filter_dict_post_processor
4+
---
5+
6+
# filter_dict_post_processor
7+
8+
**File:** `core/src/utcp/implementations/post_processors/filter_dict_post_processor.py`
9+
10+
### class FilterDictPostProcessor ([ToolPostProcessor](./../../interfaces/tool_post_processor.md#toolpostprocessor)) {#filterdictpostprocessor}
11+
12+
<details>
13+
<summary>Documentation</summary>
14+
15+
Post-processor that filters dictionary keys from tool results.
16+
17+
Provides flexible filtering capabilities to include or exclude specific keys
18+
from dictionary results, with support for nested dictionaries and lists.
19+
Can be configured to apply filtering only to specific tools or manuals.
20+
21+
22+
**Attributes**
23+
24+
- **`tool_post_processor_type`**: Always "filter_dict" for this processor.
25+
- **`exclude_keys`**: List of keys to remove from dictionary results.
26+
- **`only_include_keys`**: List of keys to keep in dictionary results (all others removed).
27+
- **`exclude_tools`**: List of tool names to skip processing for.
28+
- **`only_include_tools`**: List of tool names to process (all others skipped).
29+
- **`exclude_manuals`**: List of manual names to skip processing for.
30+
- **`only_include_manuals`**: List of manual names to process (all others skipped).
31+
</details>
32+
33+
#### Fields:
34+
35+
- tool_post_processor_type: Literal['filter_dict']
36+
- exclude_keys: Optional[List[str]]
37+
- only_include_keys: Optional[List[str]]
38+
- exclude_tools: Optional[List[str]]
39+
- only_include_tools: Optional[List[str]]
40+
- exclude_manuals: Optional[List[str]]
41+
- only_include_manuals: Optional[List[str]]
42+
43+
---
44+
45+
### class FilterDictPostProcessorConfigSerializer ([Serializer](./../../interfaces/serializer.md#serializer)[FilterDictPostProcessor]) {#filterdictpostprocessorconfigserializer}
46+
47+
*No class documentation available*
48+
49+
---
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: limit_strings_post_processor
3+
sidebar_label: limit_strings_post_processor
4+
---
5+
6+
# limit_strings_post_processor
7+
8+
**File:** `core/src/utcp/implementations/post_processors/limit_strings_post_processor.py`
9+
10+
### class LimitStringsPostProcessor ([ToolPostProcessor](./../../interfaces/tool_post_processor.md#toolpostprocessor)) {#limitstringspostprocessor}
11+
12+
<details>
13+
<summary>Documentation</summary>
14+
15+
Post-processor that limits the length of string values in tool results.
16+
17+
Truncates string values to a specified maximum length to prevent
18+
excessively large responses. Processes nested dictionaries and lists
19+
recursively. Can be configured to apply limiting only to specific
20+
tools or manuals.
21+
22+
23+
**Attributes**
24+
25+
- **`tool_post_processor_type`**: Always "limit_strings" for this processor.
26+
- **`limit`**: Maximum length for string values (default: 10000 characters).
27+
- **`exclude_tools`**: List of tool names to skip processing for.
28+
- **`only_include_tools`**: List of tool names to process (all others skipped).
29+
- **`exclude_manuals`**: List of manual names to skip processing for.
30+
- **`only_include_manuals`**: List of manual names to process (all others skipped).
31+
</details>
32+
33+
#### Fields:
34+
35+
- tool_post_processor_type: Literal['limit_strings']
36+
- limit: int
37+
- exclude_tools: Optional[List[str]]
38+
- only_include_tools: Optional[List[str]]
39+
- exclude_manuals: Optional[List[str]]
40+
- only_include_manuals: Optional[List[str]]
41+
42+
---
43+
44+
### class LimitStringsPostProcessorConfigSerializer ([Serializer](./../../interfaces/serializer.md#serializer)[LimitStringsPostProcessor]) {#limitstringspostprocessorconfigserializer}
45+
46+
*No class documentation available*
47+
48+
---

docs/api/core/utcp/implementations/tag_search.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,38 @@ sidebar_label: tag_search
99

1010
### class TagAndDescriptionWordMatchStrategy ([ToolSearchStrategy](./../interfaces/tool_search_strategy.md#toolsearchstrategy)) {#taganddescriptionwordmatchstrategy}
1111

12-
*No class documentation available*
12+
<details>
13+
<summary>Documentation</summary>
14+
15+
Tag and description word match strategy.
16+
17+
18+
**Implements A Weighted Scoring System That Matches Tools Based On**
19+
20+
1. Tag matches (higher weight)
21+
2. Description word matches (lower weight)
22+
23+
The strategy normalizes queries to lowercase, extracts words using regex,
24+
and calculates relevance scores for each tool. Results are sorted by
25+
score in descending order.
26+
27+
28+
29+
**Attributes**
30+
31+
- **`tool_search_strategy_type`**: Always "tag_and_description_word_match".
32+
- **`description_weight`**: Weight multiplier for description word matches (default: 1.0).
33+
- **`tag_weight`**: Weight multiplier for tag matches (default: 3.0).
34+
35+
36+
37+
**Scoring Algorithm**
38+
39+
- Each matching tag contributes tag_weight points
40+
- Each matching description word contributes description_weight points
41+
- Tools with higher scores are ranked first
42+
- Tools with zero score are included in results (ranked last)
43+
</details>
1344

1445
#### Fields:
1546

docs/api/core/utcp/plugins/plugin_loader.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ sidebar_label: plugin_loader
77

88
**File:** `core/src/utcp/plugins/plugin_loader.py`
99

10+
### Function _load_plugins() {#_load_plugins}
11+
12+
*No function documentation available*
13+
14+
---
15+
1016
### Function ensure_plugins_initialized() {#ensure_plugins_initialized}
1117

1218
*No function documentation available*

docs/api/index.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This specification is organized by module of the reference python implementation
1111

1212
**Note:** The modules don't have to be implemented in the same way as in the reference implementation, but all of the functionality here needs to be provided.
1313

14-
**Total documented items:** 189
15-
**Modules documented:** 39
14+
**Total documented items:** 195
15+
**Modules documented:** 41
1616

1717
## Core Modules
1818

@@ -93,6 +93,16 @@ Core UTCP framework components that define the fundamental interfaces and implem
9393
- **Contains:** 2 classes, 12 methods
9494

9595

96+
### [utcp.implementations.post_processors.filter_dict_post_processor](./core\utcp\implementations\post_processors\filter_dict_post_processor.md)
97+
98+
- **Contains:** 2 classes
99+
100+
101+
### [utcp.implementations.post_processors.limit_strings_post_processor](./core\utcp\implementations\post_processors\limit_strings_post_processor.md)
102+
103+
- **Contains:** 2 classes
104+
105+
96106
### [utcp.implementations.tag_search](./core\utcp\implementations\tag_search.md)
97107

98108
- **Contains:** 2 classes, 3 methods
@@ -140,7 +150,7 @@ Core UTCP framework components that define the fundamental interfaces and implem
140150

141151
### [utcp.plugins.plugin_loader](./core\utcp\plugins\plugin_loader.md)
142152

143-
- **Contains:** 1 functions
153+
- **Contains:** 2 functions
144154

145155

146156
### [utcp.utcp_client](./core\utcp\utcp_client.md)
@@ -154,7 +164,7 @@ Plugin implementations that extend UTCP with specific transport protocols and ca
154164

155165
### [communication_protocols.cli.src.utcp_cli.cli_call_template](./plugins\communication_protocols\cli\src\utcp_cli\cli_call_template.md)
156166

157-
- **Contains:** 2 classes, 2 methods
167+
- **Contains:** 3 classes, 2 methods
158168

159169

160170
### [communication_protocols.cli.src.utcp_cli.cli_communication_protocol](./plugins\communication_protocols\cli\src\utcp_cli\cli_communication_protocol.md)

0 commit comments

Comments
 (0)