Skip to main content
Glama

Fabrement

Get fields

fabrement-get-fields
Read-only

The custom fields defined for a post type (Fabrement fields): every field with its name and meta key (fab_), retired ones marked "retired": true, the form layout and the revision. Call it before save-fields (you need its revision and the existing fields) and before a template reads fields. revision 0 = no fields yet. Templates read values with fabrement_get_field('', $id), the record id passed explicitly, never get_post_meta. Site-wide settings: get-options-page. "problem" = the field file is broken: nothing can be saved until the user fixes or removes wp-content/fabrement/fields/; tell them, do not recreate the fields. Rules: get-skill-doc {id:"fields-contract"} — read it before the first call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesPost type slug, e.g. "project" or "page".
typeYesOwner kind: "post", any post type with an admin screen (page, post, a Fabrement CPT, a plugin's type). Site-wide settings are not fields of a type: they are options pages (get-options-page / save-options-page).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only supply readOnlyHint, and the description adds real behavioural context: retired fields are flagged, revision 0 means no fields exist yet, and the "problem" state means the field file is broken so nothing can be saved until the user fixes or removes wp-content/fabrement/fields/<file>, with an explicit instruction not to recreate the fields. That error-state guidance is exactly what annotations cannot convey.

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?

Front-loaded with the core purpose and the return contents, but it then stacks several concerns (workflow ordering, template read idiom, options-page redirect, problem-state handling) plus a trailing rules line about the skill doc. Dense but each sentence carries information; minor structural sprawl.

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?

With no output schema, the description carries the full burden and does so: it enumerates the returned shape (names, meta keys, retired markers, layout, revision), documents the empty case and the broken-file case, and states the upstream/downstream workflow. Nothing needed to call it correctly is missing.

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 coverage is 100%, so both parameters are already documented in the schema, including the slug pattern example and the "post" owner kind. The description only lightly reinforces this (site-wide settings are not fields of a type), so baseline 3 is appropriate.

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

Purpose4/5

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

Specific verb+resource: it returns the custom fields defined for a post type, enumerating name, meta key (fab_<name>), retired flag, form layout and revision. It explicitly demarcates itself from the options-page tools ("Site-wide settings: get-options-page"), but it never mentions the near-neighbour fabrement-list-post-type-fields, leaving that ambiguity for the agent.

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?

Explicit sequencing rules: call it before save-fields (because the caller needs the revision and existing fields) and before a template reads fields. It also names the read path for values (fabrement_get_field with an explicit record id, never get_post_meta) and mandates reading the fields-contract skill doc before the first call.

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.

Resources