# userCmd Callpaths

The standard call to `CrocSwapDex` is run through `userCmd()`&#x20;

&#x20;The method call follows the below generalized format:

```
function userCmd (
  uint16 callpath, 
  bytes calldata cmd)
  public payable returns (bytes memory)
```

`callpath` is a 16-bit index that identifies the specific proxy contract the command call is forwarded to through DELEGATECALL.&#x20;

`cmd` is the raw bytestring that's passed unmodified to the specific callpath. The format of this bytestring is dependent on the specific callpath.

Every call returns the raw bytestring returned by the raw callpath, which may or may not be empty.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ambient.finance/developers/dex-contract-interface/usercmd-callpaths.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
