---
title: "Server Action shape (next/server-actions)"
description: "A \"use server\" module may only export async functions; inline actions cannot live in Client Components; action arguments are serialized so they cannot be functions; a <form action> in a Server Component must be a Server Action."
url: http://localhost:4173/rules/next/server-actions
updated: 2026-11-11
---

# Server Action shape

> `next/server-actions` is a vetd rule. It flags: Server Action shape. It runs on every `check`, together with the TypeScript check.

| Fact | Value |
| --- | --- |
| Rule id | `next/server-actions` |
| Severity | error or warning |
| Group | Server and client boundaries |
| Tags | react, nextjs-16, correctness |

## Why it matters

A "use server" module may only export async functions; inline actions cannot live in Client Components; action arguments are serialized so they cannot be functions; a <form action> in a Server Component must be a Server Action.

## How to fix it

Make the export async (or move non-action exports elsewhere), move inline actions to a "use server" file, take serializable arguments, or add "use server" to the function body.

## Credit

Based on work by:

- [React team](https://react.dev): A 'use server' module exposes async functions as Server Actions whose arguments and results must be serializable.
- [Next.js team](https://nextjs.org): Specifies where Server Actions may be defined and how forms and mutations should call them.

## References

- ['use server' directive](https://react.dev/reference/rsc/use-server), React
- [Mutating Data](https://nextjs.org/docs/app/getting-started/mutating-data), Next.js
- [use server](https://nextjs.org/docs/app/api-reference/directives/use-server), Next.js
- [How to create forms with Server Actions](https://nextjs.org/docs/app/guides/forms), Next.js

## See it

Demos in the vetd Lab:

- [Actions vs route handlers](http://localhost:4173/lab/nextjs/actions-vs-route-handlers)

## Related rules

- [`next/server-action-auth`](http://localhost:4173/rules/next/server-action-auth.md)
- [`next/non-serializable-props`](http://localhost:4173/rules/next/non-serializable-props.md)

## Get this text from vetd

MCP: call `explain` with `{ "diagnosticId": "next/server-actions" }`. CLI: `npx vetd explain next/server-actions`.

---

[All 92 rules](http://localhost:4173/rules.md) · Previous: [`next/server-only-in-client`](http://localhost:4173/rules/next/server-only-in-client.md) · Next: [`next/route-params`](http://localhost:4173/rules/next/route-params.md)
