weegloo-api-query-optimization

Optimizes Weegloo list API reads with select projection, id filters, and Advanced Search headers.

1|2|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/weeglooapi/weegloo-mcp-plugin --skill weegloo-api-query-optimization-weeglooapi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: weegloo-api-query-optimization
Source: https://github.com/weeglooapi/weegloo-mcp-plugin/tree/main/plugins/weegloo/skills/weegloo-api-query-optimization
Command: npx skills add https://github.com/weeglooapi/weegloo-mcp-plugin --skill weegloo-api-query-optimization-weeglooapi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Unprojected Weegloo list API calls return whole documents with every locale bucket of every field, bloating payloads, slowing requests, and overflowing context windows. This Skill teaches how to read Content and Media correctly so queries stay small, fast, and correct. ## Core Features & Use Cases - Projection with select: Apply include/exclude modes, object paths, and order-key rules on every list read, including the agent's own cma_GetList* MCP calls. - Batch and version prefetch: Replace N single GETs with one sys.id[in] list call, and fetch sys.id plus sys.version cheaply before PATCH/PUT optimistic-concurrency updates. - Master/detail and media patterns: Build lightweight list/sidebar UIs with lazy detail fetches, resolve Refer stubs to Media file URLs, and resize images on the fly with /style1../style10 presets. - Search guidance: Decide between in-memory and server-side search, and use the X-Weegloo-Advanced-Search header required for any fields.* filter or order, which MCP tools cannot send. - Use Case: When building a gallery UI, fetch a projected list of ids and titles, lazily load the clicked item's detail, resolve its image Refer to a Media URL, and append /style3 for a 128px WebP thumbnail. ## Quick Start Ask the agent to fetch a list of Weegloo contents projecting only sys.id and fields.title, then load the selected item's detail and resolve its image URL.

Frequently Asked Questions about weegloo-api-query-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce payload size on Weegloo list API calls?

Pass the select query parameter once with comma-separated paths, such as ?select=sys.id,fields.title, to return only needed fields. Use include mode as a whitelist or prefix paths with a dash for exclude mode, but never mix both in one request.

How do I fetch multiple Weegloo resources by id in one request?

Use one list request with an in filter, for example ?sys.id[in]=1,2,3,4,5, instead of N separate GET-by-id calls. Combine it with select=sys.id,sys.version when prefetching versions before PATCH or PUT updates.

Why does my Weegloo fields.* filter return an empty list?

Filtering or ordering on fields.* requires the X-Weegloo-Advanced-Search: true header; without it text fields match by exact equality only, silently returning empty results. The header also keeps the query indexed, since unindexed fields.* scans slow down and time out as the Space grows.

Can MCP tools send the Advanced Search header for Weegloo queries?

No, the cma_GetListContents and cma_GetListMedias MCP tools accept filter, select, order, and paging but no header parameter, so fields.* filters over MCP are exact-match and unindexed. Prefer sys.* filters in MCP calls and use HTTP for real text search.

How do I get a resized thumbnail from a Weegloo Media URL?

Append a preset style segment to the Media file URL, such as /style3 for a 128px image. Ten presets from style1 (32px) to style10 (1024px) scale the longest side, preserve aspect ratio, and output WebP without re-uploading.

When is in-memory search wrong for a Weegloo content list?

In-memory filtering only works when the loaded array holds the entire dataset. For paginated, large, or unknown-size lists it silently misses unfetched rows, so use server-side search with filter parameters and page results via links.next.