Skip to main content
Glama

Flarum extension development reference

flarum_dev

Provides a development reference for Flarum 2.0 extensions, covering scaffolding, architecture, backend, frontend, scaling, testing, and porting. Consult it when building or reviewing extension code.

Instructions

A development reference for building or reviewing a Flarum 2.0 extension: scaffolding and architecture, composer.json, the TypeScript frontend, backend (API resources/models/migrations), scaling (queue-driver portability, Redis, multi-server file storage), optional ecosystem integrations (realtime, audit, fof widgets, fof sitemap), i18n, testing, static analysis & CI, releasing, and porting a 1.x extension to 2.0. Combines the conventions the official docs establish, the de-facto FriendsOfFlarum standard, and patterns that prevent real production bugs (fail-closed API fields, lazy-chunk-safe extends, atomic creation, the PHPStan/testing setup). Consult it before scaffolding, when adding a feature, or when reviewing extension code. Pair with flarum_docs_search/flarum_docs_get for the authoritative API reference. Omit topic for the full reference, or pass one to narrow it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNoSection to return: scaffold, composer, frontend, backend, scaling, integrations, i18n, testing, quality-ci, release, porting (or 'all' / omit for the full reference).
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It clearly indicates the tool returns reference content and has no side effects. While it doesn't explicitly state 'read-only' or 'no destructive actions', the context of 'development reference' and 'omit topic for full reference' implies passive retrieval. This is sufficiently transparent for a reference tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Despite its length, the description is well-structured and front-loaded with the core purpose and topics. Every sentence adds value (usage guidance, pairing, parameter behavior). It is as concise as possible given the complexity of the tool's reference topics.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is a simple reference with one optional parameter and no output schema, the description is fully complete. It covers purpose, usage, parameter options, and relationships to sibling tools, leaving no ambiguities.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of the parameter with enum values and description. The description adds value by explaining that omitting the topic returns the full reference and listing the topic values, reinforcing and clarifying the parameter's effect. This goes beyond the schema baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly defines the tool as a development reference for building/reviewing Flarum extensions, listing specific topics (scaffolding, frontend, backend, etc.) and distinguishing it from siblings like flarum_docs_search by stating the pairing. The verb 'Consult' and resource 'Flarum extension development reference' make the purpose very clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance: 'Consult it before scaffolding, when adding a feature, or when reviewing extension code.' It also explains how to narrow output with the 'topic' parameter and mentions pairing with flarum_docs_search/flarum_docs_get for alternative tools. This covers when, why, and how to use the tool effectively.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/linkrobins/mcp-for-flarum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server