Get a Flarum resource
flarum_getFetch a single Flarum resource by type and ID, optionally including related resources and selecting specific fields to return.
Instructions
Fetch a single Flarum resource by type and id, optionally including relationships and narrowing fields. Returns full field values by default (no truncation). Example: type="discussions", id="42", include="posts,user".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Resource id. | |
| type | Yes | Resource type, e.g. "discussions", "users". | |
| fields | No | Sparse fieldsets: return only named fields per type to save tokens, e.g. { discussions: "title,slug,commentCount", users: "username" }. | |
| include | No | Comma-separated relationships to include. | |
| maxFieldChars | No | Truncate string fields longer than this. 0 (default) disables truncation. |