Skip to content

Commit 3693594

Browse files
camel-docs-botwaleedalzarooni
authored andcommitted
Auto-update documentation after merge [skip ci]
1 parent 24ac33d commit 3693594

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

docs/mintlify/docs.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,12 @@
704704
"reference/camel.loaders.unstructured_io"
705705
]
706706
},
707+
{
708+
"group": "Parsers",
709+
"pages": [
710+
"reference/camel.parsers.mcp_tool_call_parser"
711+
]
712+
},
707713
{
708714
"group": "Runtimes",
709715
"pages": [
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<a id="camel.parsers.mcp_tool_call_parser"></a>
2+
3+
Utility functions for parsing MCP tool calls from model output.
4+
5+
<a id="camel.parsers.mcp_tool_call_parser.extract_tool_calls_from_text"></a>
6+
7+
## extract_tool_calls_from_text
8+
9+
```python
10+
def extract_tool_calls_from_text(content: str):
11+
```
12+
13+
Extract tool call dictionaries from raw text output.
14+
15+
<a id="camel.parsers.mcp_tool_call_parser._collect_tool_calls"></a>
16+
17+
## _collect_tool_calls
18+
19+
```python
20+
def _collect_tool_calls(payload: Any, accumulator: List[Dict[str, Any]]):
21+
```
22+
23+
Collect valid tool call dictionaries from parsed payloads.
24+
25+
<a id="camel.parsers.mcp_tool_call_parser._try_parse_json_like"></a>
26+
27+
## _try_parse_json_like
28+
29+
```python
30+
def _try_parse_json_like(snippet: str):
31+
```
32+
33+
Parse a JSON or JSON-like snippet into Python data.
34+
35+
<a id="camel.parsers.mcp_tool_call_parser._find_json_candidate"></a>
36+
37+
## _find_json_candidate
38+
39+
```python
40+
def _find_json_candidate(content: str, start_idx: int):
41+
```
42+
43+
Locate a balanced JSON-like segment starting at `__INLINE_CODE_0__`.
44+
45+
<a id="camel.parsers.mcp_tool_call_parser._truncate_snippet"></a>
46+
47+
## _truncate_snippet
48+
49+
```python
50+
def _truncate_snippet(snippet: str, limit: int = 120):
51+
```
52+
53+
Return a truncated representation suitable for logging.

0 commit comments

Comments
 (0)