bytedoc-query

Execute read-only MongoDB find queries on ByteDoc databases via ByteCloud Gateway.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill bytedoc-query-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bytedoc-query
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/bytedoc-query
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill bytedoc-query-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Engineers often need to inspect document data in ByteDoc (MongoDB) databases to debug issues or verify contents, but doing so across multiple regions and gateways requires manual authentication and connection setup. This Skill runs read-only find queries against ByteDoc collections through the ByteCloud Gateway with a single command. ## Core Features & Use Cases - MongoDB Find Queries: Execute find queries with optional filters and result limits against any ByteDoc database and collection. - Multi-Region Support: Query collections in Singapore-Central, US-East, China-North, and China-BOE regions using simple region aliases like sg, us, cn, or boe. - Structured Output: Receive query results as structured JSON including the matched documents and result count. - Use Case: While debugging a data issue, run a filtered find query such as find({"status": "active"}) on the treco_llm_core database to inspect the affected documents without writing any connection code. ## Quick Start Ask the agent to query the llm_core_task_test collection in the treco_llm_core ByteDoc database and return the first 10 documents matching a status filter.

Frequently Asked Questions about bytedoc-query

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

FAQPage Schema
How do I query a ByteDoc MongoDB database?

Run gdpa-cli run bytedoc-query with a JSON input containing the database name, collection name, and an optional MongoDB query string such as find({"status": "active"}). Results are returned as structured JSON with the matched documents and count.

How to query MongoDB collections in different regions?

Pass the vregion parameter with an alias like sg, us, cn, or boe to target Singapore-Central, US-East, China-North, or China-BOE. The default region is Singapore-Central, and each region routes through its corresponding ByteCloud Gateway.

Can I insert or update documents in ByteDoc with this tool?

No, this tool is strictly read-only and only supports MongoDB find queries. Insert, update, and delete operations are not supported, so use a separate database administration path for write operations.

Why does my ByteDoc query fail with an authentication error?

Authentication failures indicate a JWT token problem with the ByteCloud Gateway. For Singapore or US regions run gdpa-cli login i18n, and for China regions run gdpa-cli login, then retry the query.

What happens if I do not provide a query parameter?

The query parameter defaults to find(), which returns all documents in the specified collection. You can add a limit parameter to cap the number of returned results.