---
title: "Server Functions - Air Market"
description: "You need something to run on the server - a database write, a secret key, a header you can only read there - but you want to call it from your client code without hand-rolling an endpoint. This cover…"
canonical: "https://airmarket.ai/app/server-functions"
---

[Air Market](/) / [Developer Tools](/category/devtools) / Server Functions

Skill by [TanStack](/@tanstack)

# Server Functions

Call server code from the client like an ordinary function

## What this does

You need something to run on the server - a database write, a secret key, a header you can only read there - but you want to call it from your client code without hand-rolling an endpoint. This covers defining those server functions, checking their input, and dealing with errors and redirects. Reach for it when a component needs real server work done.

### Top 3 things it does for you

- Define a server function and call it from a component
- Validate what comes in before you use it
- Read headers and set response status or codes

## Information

**Server Functions at a glance**

|  |  |
| --- | --- |
| Kind | Skill |
| Publisher | [TanStack](/@tanstack) |
| Category | [Developer Tools](/category/devtools) |
| Works with | Agent Skills - an open standard supported by 40+ agents |
| Size | 16 KB |
| Licence | MIT |
| Repository | [TanStack/router](https://github.com/TanStack/router/tree/179d9b9b5eec50dc7833b4e2ef91b735d34bbc07/packages/start-client-core/skills/start-core/server-functions) |
| GitHub stars | 14,984 (as of Nov 2026) |

## Security report

**Verified.** AIR scanned this exact version of Server Functions and flagged nothing. AIR's verdict: **safe**.

**What Server Functions's check was run against**

|  |  |
| --- | --- |
| Commit | 179d9b9b5eec50dc7833b4e2ef91b735d34bbc07 |
| Content hash | e4b6ee759c1b9e0779958c39963ac124a04f4a7d78a2e876561cb6e2f2ab7c36 |
| Files read | [Browse the files at this exact commit](https://github.com/TanStack/router/blob/179d9b9b5eec50dc7833b4e2ef91b735d34bbc07/packages/start-client-core/skills/start-core/server-functions/SKILL.md) |

A scan is named by the exact content it read, not by a version number. A different version is a different artifact, and nothing here applies to a version AIR has not scanned.

[Read the full security report for Server Functions](/security/server-functions)

## About Server Functions

This covers createServerFn for GET and POST server functions, the validator option using either Zod or a plain function, and the useServerFn hook for calling them from your components.

It includes the server context utilities - getRequest, getRequestHeader, setResponseHeader, setResponseStatus - and how to handle errors by throwing, redirecting, or signalling not found.

Streaming and FormData handling are covered, along with how to organise the files themselves using the .functions.ts and .server.ts conventions.

## What's inside

- SKILL.md - instructions

## Questions

### Is Server Functions safe to install?

AIR scanned this exact version of Server Functions and flagged nothing. AIR's verdict: safe. The verdict is named by the content that was read, at commit 179d9b9b5eec, so it cannot drift onto a version nobody scanned. The full report is at https://airmarket.ai/security/server-functions.

### How do I install Server Functions?

Open https://airmarket.ai/app/server-functions on Air Market and use the install action: Air Market hands Claude a prompt naming this exact skill, and Claude sets it up. Source, pinned to the exact commit this listing describes: https://github.com/TanStack/router/tree/179d9b9b5eec50dc7833b4e2ef91b735d34bbc07/packages/start-client-core/skills/start-core/server-functions. Install from that link, not the branch.

## Related on Air Market

- [More Developer Tools listings](/category/devtools)
- [Everything by TanStack](/@tanstack)

---

Canonical URL: <https://airmarket.ai/app/server-functions>
