> ## Documentation Index
> Fetch the complete documentation index at: https://redop.useagents.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Register Resources

> Add static and template resources to a Redop server with resource.

Use resources when clients should read data instead of calling a tool.

## Static resource

```ts theme={null}
app.resource("config://server", {
  name: "Server config",
  mimeType: "application/json",
  handler: async () => ({
    type: "text",
    text: JSON.stringify({ region: "eu-west-1" }),
  }),
});
```

## Template resource

When you register a template URI, Redop infers the handler `params` shape from the placeholders in that URI. For `users://{id}/profile`, `params.id` is typed as `string`.

```ts theme={null}
app.resource("users://{id}/profile", {
  name: "User profile",
  mimeType: "application/json",
  handler: async ({ params }) => ({
    type: "text",
    text: JSON.stringify({ id: params.id }),
  }),
});
```

## What to return

* `{ type: "text", text, mimeType? }` for UTF-8 content
* `{ type: "blob", blob, mimeType? }` for base64-encoded binary content

## Next

* [Notify resource subscribers](/docs/guides/notify-resource-changes)
* [Concept: resources and prompts](/docs/concepts/resources-prompts)
