50-metadata-config

50-metadata-config is a cursor rule for Cursor from marianfoo/abap-mcp-server. It costs 567 tokens per session, scanned A, a copy of 50-metadata-config, Apache-2.0.

Rules for managing project configuration and descriptive metadata, meaning structured information about documentation sources, mappings, labels, and search behavior. The project keeps these settings in a central metadata file with typed access functions.

In plain words
What is it for?
Use it when adding or changing documentation sources, search synonyms, source mappings, context boosts, URLs, or interface labels.
Why use it?
It prevents related settings from being scattered across the codebase and helps metadata-driven features use one consistent source of truth.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

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 rules/marianfoo/abap-mcp-server/50-metadata-config
Clone the repo
git clone --depth 1 https://github.com/marianfoo/abap-mcp-server

Made for: Cursor.

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 50-metadata-config

README.md
[![agentmods](https://agentmods.dev/badge/rules/marianfoo/abap-mcp-server/50-metadata-config.svg)](https://agentmods.dev/rules/marianfoo/abap-mcp-server/50-metadata-config)
Your own site
<a href="https://agentmods.dev/rules/marianfoo/abap-mcp-server/50-metadata-config"><img src="https://agentmods.dev/badge/rules/marianfoo/abap-mcp-server/50-metadata-config.svg" alt="Measured on agentmods" height="20"></a>
Per session 567 This file is loaded in full into every session.
When invoked 567 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.1 $0.00567 $0.00567
Opus 5 $0.00283 $0.00283
Sonnet 5 $0.00113 $0.00113
Haiku 4.5 $0.00057 $0.00057

Measured 6d ago against content hash 6c56ec9a811d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

50-metadata-config 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 6d 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.

Origin

This is a copy

100% identical to 50-metadata-config — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/50-metadata-config.mdc · 55 lines

How it starts

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

Metadata & Configuration (Rule)

For centralized configuration management and metadata-driven features.

Metadata System Architecture

  • Central Config: src/metadata.json - Single source of truth
  • Type-Safe APIs: src/lib/metadata.ts - 12 comprehensive functions
  • Core Settings: src/lib/config.ts - System-level configuration only
  • Runtime Loading: Metadata loaded once at startup with fallbacks

Configuration Structure

{
  "sources": [/* 12 documentation sources with full metadata */],
  "contextBoosts": {/* Context-specific scoring boosts */},
  "libraryMappings": {/* Source ID to library ID mappings */},
  "contextEmojis": {/* UI presentation emojis */},
  "synonyms": [/* Query expansion synonyms */],
  "acronyms": {/* Acronym expansions */}
}

Metadata APIs (12 functions)

  • URL Configuration: getDocUrlConfig(), getAllDocUrlConfigs()
  • Source Paths: getSourcePath(), getAllSourcePaths()
  • Context Boosts: getContextBoosts(), getAllContextBoosts()
  • Library Mappings: getLibraryMapping(), getAllLibraryMappings()
  • UI Elements: getContextEmoji(), getAllContextEmojis()
  • Source Lookup: getSourceByLibraryId(), getSourceById()

Adding New Sources

  1. Add source definition to src/metadata.json
  2. Include: id, libraryId, sourcePath, baseUrl, pathPattern, anchorStyle, boost, tags
  3. Add to contextBoosts if context-specific scoring needed
  4. Add to libraryMappings if ID mapping required
  5. No code changes needed - APIs handle automatically

Configuration Best Practices

  • Single Source: All source configs in metadata.json only
  • Type Safety: Use metadata APIs, never direct JSON access
  • Fallbacks: APIs return sensible defaults for missing data
  • Validation: Metadata loading includes error handling
  • Environment: Core settings can be overridden via env vars

Migration from Hardcoded Config

  • Before: Scattered configs in multiple files (~250+ lines)
  • After: Centralized metadata with type-safe access
  • Benefits: Maintainable, extensible, no code changes for new sources

Read the full file on GitHub · 55 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. 6d ago First seen · 55 lines · 567 tokens per session scan A 6c56ec9a811d

Subscribe to this mod's changes

50-metadata-config is a cursor rule published in the GitHub repository marianfoo/abap-mcp-server (88 stars, last pushed 18d ago), licensed Apache-2.0. It adds 567 tokens to every session, about $0.0028 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to 50-metadata-config, differing in 0 lines, and is treated as a copy.