Skip to main content
Glama

OpenFactory

get_feature_reference

Read the feature library: the JSON, the hook, and its companion files.

This is a READER. It returns facts and decides nothing -- no recommended feature, no ranking, no "you probably want". You author config/ from the recipe yourself; this is where you look up what a feature actually installs before you do.

With no feature_ids it returns the index (id, display name, category) of every packaged feature, optionally filtered by category.

With feature_ids it returns every requested reference together under references. Use one call for the complete selected feature set. Each reference contains:

  • feature -- the parsed feature JSON, and feature_json its verbatim text. Package lists are per distro (packages.debian, .ubuntu, .fedora, .opensuse, optional .arch); env_var is the ENABLE_<X> flag its hook gates on; third_party_repo declares an APT repo and its keyring.

  • hook -- the verbatim text of app/hooks/<category>/<feature>.sh when the feature ships one, with hook_path. Most features ship none: a package list is the whole feature.

  • companions -- {filename: text} for the <stem>-*.sh / <stem>-*.py files that are copied beside the hook. A hook read without them is incomplete. Place them differently from the hook: the hook is written to config/hooks/live/NNNN-<feature>.chroot, but a companion goes to config/hooks/live/<filename> UNNUMBERED, keeping the exact name returned here, and the mode follows the suffix -- .sh is 0755 because the hook sources or executes it, .py is 0644 because the hook installs it into the image rather than running it in the chroot. Renaming, number-prefixing or 0755-ing a .py breaks the hook, which refers to it by exact name.

There is no generator key and no Python escape hatch. A feature is its package lists, its hook and the files that hook reads; where a hook reads a staged manifest its own header names the packaged asset template and the slots to fill in the installed openfactory-build skill references.

Copy a hook body verbatim when you use it. Paraphrasing a hook loses the distro workaround it was written for, and those workarounds are why the hook exists.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_feature_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyNoOpenFactory MCP API key (optional).
categoryNoRestrict the index to one category directory, e.g. 'desktop', 'services', 'security'. Ignored when feature_ids is given.
feature_idsNoAll features to read in one call, even when only one is needed. Omit to get the feature index; maximum 32.
session_tokenNoSession token from a previous tool response. IMPORTANT: Always pass the session_token from the most recent tool response to maintain session continuity.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does so well: it declares the read-only, non-advisory nature, describes the exact shape of each returned reference (feature JSON, hook, companions), and warns that companions must be placed unnumbered with suffix-driven modes because a hook refers to them by exact name. It omits failure behavior for unknown feature_ids and says nothing about the api_key/session_token semantics.

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

Conciseness4/5

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

It is front-loaded with the one-line purpose and the READER framing, then organized into bulleted return structure and a placement warning, which is easy to scan. It runs long for a lookup tool and one passage about staged manifests ('where a hook reads a staged manifest its own header names the packaged asset template...') is a garbled fragment that costs clarity.

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?

For a moderately complex lookup tool, the description covers both call modes, the per-reference contents, and the non-obvious file-placement and mode rules that would otherwise cause broken builds. Even though an output schema exists, the extra narrative about companion naming and verbatim hook copying is exactly the context an agent needs to act correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the parameters are already documented structurally, including 'Omit to get the feature index' and the default of category. The description adds the meaningful point that passing feature_ids changes the result shape entirely (everything returned together under 'references'), but most of its word count explains return values rather than parameter meaning.

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 opens with a specific verb and resource ('Read the feature library: the JSON, the hook, and its companion files') and immediately bounds the tool's role ('This is a READER. It returns facts and decides nothing'). It also clarifies the boundary against the authoring step ('You author config/ from the recipe yourself'), so an agent knows this is lookup, not generation.

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

Usage Guidelines4/5

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

It gives clear conditional usage: no feature_ids returns the index (optionally filtered by category), feature_ids returns full references, and 'Use one call for the complete selected feature set.' The stated intent 'this is where you look up what a feature actually installs before you do' tells the agent when to reach for it. It stops short of naming an explicit alternative tool or a when-not case beyond category being ignored.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.