# `vllm_mlx.tool_parsers`

Tool call parsers for vllm-mlx.

[View the complete module source at #L1-L116](https://github.com/waybarrios/vllm-mlx/blob/a69d47912bcb21d8fe04d48f75fa896b620ffcfa/vllm_mlx/tool_parsers/__init__.py#L1-L116).

## API details

Each callable below includes its exact signature, type annotations, inputs, defaults, return contract, documented exceptions, implementation source, and parsed docstring sections when the source provides them.

::: vllm_mlx.tool_parsers
    options:
      members:
        - get_parser_stop_tokens
        - __all__
      filters: []
      show_if_no_docstring: true

## Complete contract reference

Expand any definition for its exact inputs, annotations, defaults, return contract, directly raised exceptions, source-grounded behavior, and immutable line link. This section includes private and nested definitions that ordinary API generators omit.

<details class="api-contract" id="contract-vllm_mlx.tool_parsers.get_parser_stop_tokens" markdown="1">
<summary><code>vllm_mlx.tool_parsers.get_parser_stop_tokens</code> · function</summary>

```python
vllm_mlx.tool_parsers.get_parser_stop_tokens(parser_name: str | None, user_stops: list[str] | None) -> list[str]
```

Merge user-supplied stops with parser-declared extras (deduped).

**Parameters**

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `parser_name` | `str \| None` | `yes` | `none` | Required positional or keyword input. |
| `user_stops` | `list[str] \| None` | `yes` | `none` | Required positional or keyword input. |

**Returns**

- Type: `list[str]`
- Direct return expressions: `stops`

**Exceptions and behavior**

Function `get_parser_stop_tokens` calls `list`, `ToolParserManager.get_tool_parser`, `getattr`, `stops.append`; returns `stops`.
No direct `raise` statement appears in this definition.

[View source #L68-L88](https://github.com/waybarrios/vllm-mlx/blob/a69d47912bcb21d8fe04d48f75fa896b620ffcfa/vllm_mlx/tool_parsers/__init__.py#L68-L88).

</details>

## Complete symbol map

This map also includes private definitions and nested helpers. The signature column exposes every explicit input even when an internal helper has no dedicated parameter prose.

| Symbol | Kind | Signature and inputs | What it does | Source |
| --- | --- | --- | --- | --- |
| [`get_parser_stop_tokens`](#contract-vllm_mlx.tool_parsers.get_parser_stop_tokens) | function | `get_parser_stop_tokens(parser_name: str \| None, user_stops: list[str] \| None) -> list[str]` | Merge user-supplied stops with parser-declared extras (deduped). | [#L68-L88](https://github.com/waybarrios/vllm-mlx/blob/a69d47912bcb21d8fe04d48f75fa896b620ffcfa/vllm_mlx/tool_parsers/__init__.py#L68-L88) |
