# parse_pasted_path_payload

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/input/parse_pasted_path_payload)

Parse dropped-path payload variants through one entrypoint.

Parsing order is:
1. strict multi-path payload parsing (`parse_pasted_file_paths`)
2. single-path normalization/parsing (`parse_single_pasted_file_path`)
3. optional leading-path extraction (`extract_leading_pasted_file_path`)

## Signature

```python
parse_pasted_path_payload(
    text: str,
    *,
    allow_leading_path: bool = False,
) -> ParsedPastedPathPayload | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | `str` | Yes | Input payload to parse. |
| `allow_leading_path` | `bool` | No | Whether to parse a leading path token followed by trailing prompt text. (default: `False`) |

## Returns

`ParsedPastedPathPayload | None`

Parsed payload details, otherwise `None`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/bb27e62ebe44dd6e8104a504b1718ce87acc7ffa/libs/cli/deepagents_cli/input.py#L383)