# args

> This document is the Markdown version of [valibot.dev/api/args/](https://valibot.dev/api/args/). For the complete documentation index, see [llms.txt](https://valibot.dev/llms.txt).

Creates a function arguments transformation action.

```ts
const Action = v.args<TInput, TSchema>(schema);
```

## Generics

- `TInput` `extends (...args: any[]) => unknown`
- `TSchema` `extends LooseTupleSchema<TupleItems, ErrorMessage<LooseTupleIssue> | undefined> | StrictTupleSchema<TupleItems, ErrorMessage<StrictTupleIssue> | undefined> | TupleSchema<TupleItems, ErrorMessage<TupleIssue> | undefined> | TupleWithRestSchema<TupleItems, BaseSchema<unknown, unknown, BaseIssue<unknown>>, ErrorMessage<TupleWithRestIssue> | undefined>`

## Parameters

- `schema` `TSchema`

### Explanation

With `args` you can force the arguments of a function to match the given `schema`.

## Returns

- `Action` `ArgsAction<TInput, TSchema>`

## Examples

The following examples show how `args` can be used.

### Function schema

Schema of a function that transforms a string to a number.

```ts
const FunctionSchema = v.pipe(
  v.function(),
  v.args(v.tuple([v.pipe(v.string(), v.decimal())])),
  v.returns(v.number())
);
```

## Related

The following APIs can be combined with `args`.

### Schemas

[`any`](/api/any.md), [`custom`](/api/custom.md), [`looseTuple`](/api/looseTuple.md), [`function`](/api/function.md), [`strictTuple`](/api/strictTuple.md), [`tuple`](/api/tuple.md), [`tupleWithRest`](/api/tupleWithRest.md)

### Methods

[`pipe`](/api/pipe.md)

### Utils

[`isOfKind`](/api/isOfKind.md), [`isOfType`](/api/isOfType.md)
