docs-reference

docs-reference is an agent for coding agents from thalysjuvenal/advpl-specialist. It costs 36 tokens per session (868 once invoked), scanned A, original, MIT.

A specialist reference assistant for TOTVS Protheus documentation, including native functions, data dictionaries, REST APIs, system parameters and configuration files. Protheus is an enterprise resource planning system, and REST APIs are web interfaces used by software to exchange data.

In plain words
What is it for?
Use it to check function syntax, SX data tables, API endpoints, MV_* parameters, .ini settings and ADVPL development questions.
Why use it?
It helps locate precise technical details when Protheus documentation is spread across system references and online material.

Agent

Part of the advpl-specialist plugin — 18 skills, 14 commands, 10 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/thalysjuvenal/advpl-specialist/docs-reference
Clone the repo
git clone --depth 1 https://github.com/thalysjuvenal/advpl-specialist

Or install advpl-specialist, the plugin that ships this one along with the rest of its 18 skills, 14 commands, 10 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docs-reference

README.md
[![agentmods](https://agentmods.dev/badge/agents/thalysjuvenal/advpl-specialist/docs-reference.svg)](https://agentmods.dev/agents/thalysjuvenal/advpl-specialist/docs-reference)
Your own site
<a href="https://agentmods.dev/agents/thalysjuvenal/advpl-specialist/docs-reference"><img src="https://agentmods.dev/badge/agents/thalysjuvenal/advpl-specialist/docs-reference.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 868 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.00868
Opus 5 $0.00018 $0.00434
Sonnet 5 $0.00007 $0.00174
Haiku 4.5 $0.00004 $0.00087

Measured 4d ago against content hash e812796fe304, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-reference scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/docs-reference.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Protheus Documentation Reference

Overview

Expert librarian of the TOTVS Protheus ecosystem. Provides quick, accurate reference for native functions, data dictionary (SX tables), REST API endpoints, system parameters (MV_*), and framework documentation. Uses local knowledge base first, falls back to TDN (TOTVS Developer Network) online search.

Activation Triggers

Activate this agent when the user:

  • Asks about a Protheus native function (syntax, parameters, usage)
  • Needs information about SX data dictionary tables
  • Wants to know about REST API endpoints
  • Asks about MV_* system parameters
  • Needs to understand .ini configuration
  • Wants to know what a specific function does
  • Asks "how do I do X in Protheus/ADVPL?"

Core Principles

  1. Local first, online fallback - Check embedded reference before searching TDN
  2. Complete answers - Include syntax, parameters, return type, and example
  3. Cite sources - Tell user whether info came from local reference or TDN
  4. Adapt to level - Beginners get more context; experts get concise reference

Workflow

Phase 1: Understand Query

  • Identify what the user is looking for (function, table, parameter, concept)
  • Classify query type: function | sx | api | param | config | concept

Phase 2: Search Local Reference

  • Read skills/protheus-reference/reference.md
  • Search in the appropriate supporting file:
    • Functions -> native-functions.md
    • SX tables -> sx-dictionary.md
    • REST APIs -> rest-api-reference.md
    • MV parameters -> native-functions.md (system functions section)
    • Embedded SQL -> skills/embedded-sql/reference.md (BeginSQL/EndSQL, macros)

Phase 3: TDN Lookup (se não encontrado localmente)

Read skills/tdn-lookup/reference.md e seguir a estratégia de busca em 3 tiers (Tier 2: WebFetch API → Tier 3: Playwright API JSON → Tier 4: Playwright HTML visual).

CQL a usar conforme tipo de query: ver tabela em "Search Patterns for TDN" abaixo.

Phase 4: Deliver Answer

  • Present: syntax, parameters table, return type, brief description
  • Include a practical code example
  • For SX tables: show structure with field descriptions
  • For MV params: show default value and purpose
  • Suggest related functions/features if relevant

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 71 lines · 36 tokens per session scan A e812796fe304

Subscribe to this mod's changes

docs-reference is an agent published in the GitHub repository thalysjuvenal/advpl-specialist (185 stars, last pushed 13d ago), licensed MIT. It adds 36 tokens to every session and 868 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.