schema-discovery
Skill0 starsChanged 3 months agoMITView on GitHub
The schema-discovery skill provides capabilities for locating and parsing MCP schema files within a git repository. It handles multiple file conventions, malformed JSON, and monorepo-style multi-schema layouts.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/fabric-apps-analytic-templatestheir own version, first seen Nov 29, 2026
- microsoft/ignite26-PREL40their own version, first seen Nov 22, 2026
- microsoft/awesome-rayfintheir own version, first seen Nov 15, 2026
- microsoft/DataHub-App-for-Microsoft-Copilot-Agents-Cowork-and-Autopilotstheir own version, first seen Nov 8, 2026
- Happy-Technologies-LLC/happy-platform-skillstheir own version, first seen Nov 1, 2026
- microsoft/ValueLens-for-Microsoft-Copilottheir own version, first seen Oct 25, 2026
Used with
Projects with it also use rayfin-functions.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillrayfin-functions
Use when writing Rayfin user-defined functions (UDFs), invoking functions from frontend code, or using functions CLI commands. Triggers: rayfin functions, udf.func, UserDataFunctions, RayfinContext, FabricContext, AppFunctionsSchema, functions init, dev functions apply, client.functions, invoke, func start, function_app.ts, types.ts, rayfin/functions/, FunctionClient, FunctionsSchema, fabric-user-data-functions, functionsBaseUrl, VITE_RAYFIN_FUNCTIONS_URL, bootstrap.ts, rayfinClient.ts
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- microsoft/rayfin★ 646same name
- microsoft/awesome-rayfin★ 116same name
- Happy-Technologies-LLC/happy-platform-skills★ 41same name
- microsoft/ConsumptionCentral-for-Microsoft-Copilot★ 36same name
- microsoft/fabric-apps-analytic-templates★ 31same name
- microsoft/ValueLens-for-Microsoft-Copilot★ 23same name
- microsoft/AnalyticsHub-Dashboard★ 16same name
- microsoft/DataHub-App-for-Microsoft-Copilot-Agents-Cowork-and-Autopilots★ 16same name
- microsoft/aitour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 3same name
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 3same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- change-detectionSkill
- changelog-generationSkill
- cli-developmentSkill
- config-loaderSkill
- github-actionSkill
- git-integrationSkill
- json-diffSkill
- migration-guide-generationSkill
- performance-optimizationSkill
- security-auditSkill
- testing-strategySkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 252
Lazy parsing: Only parse files that match patterns
- Distinctive: line 253
Parallel discovery: Check multiple patterns concurrently
- Distinctive: line 254
Cache parsed schemas: Avoid re-parsing within a run
- Distinctive: line 255
Early termination: Stop at first match for single-schema mode
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Schema Discovery Skill
Purpose
The schema-discovery skill provides capabilities for locating and parsing MCP schema files within a git repository. It handles multiple file conventions, malformed JSON, and monorepo-style multi-schema layouts.
Capabilities
1. Schema File Location
- Auto-detect schema files by convention
- Support configurable file patterns
- Handle glob patterns for multi-schema repos
- Exclude directories (node_modules, dist, etc.)
2. Schema Parsing
- Parse JSON and YAML schema files
- Validate parsed schemas against ToolSnapshot interface
- Provide helpful error messages for malformed files
- Support schema version detection
3. Multi-Schema Aggregation
- Handle repos with multiple schema files
- Merge or keep separate based on configuration
- Detect schema conflicts between files
- Support schema path prefixes for namespacing
Usage Examples
Auto-Detecting Schema Files
import { SchemaLocator } from '@reaatech/mcp-changelog/discovery';
const locator = new SchemaLocator({ repoPath: '/path/to/repo' });
// Auto-detect schema at HEAD
const schemas = await locator.locate('HEAD');
console.log(schemas);
// [
// {
// path: 'schema.json',
// ref: { type: 'tag', name: 'HEAD', sha: '...' },
// schema: { version: '1.0.0', tools: [...] }
// }
// ]
// Auto-detect at a specific tag
const v1Schemas = await locator.locate('v1.0.0');Custom Schema Patterns
import { SchemaLocator, SchemaLocatorConfig } from '@reaatech/mcp-changelog/discovery';
const config: SchemaLocatorConfig = {
patterns: [
'mcp-schema.json',
'api/schema.json',
'**/*.mcp.json'
],
exclude: ['node_modules/**', 'dist/**', '.git/**']
};
const locator = new SchemaLocator({ repoPath: '/path/to/repo', config });
const schemas = await locator.locate('v2.0.0');Parsing Schema Files
import { SchemaParser } from '@reaatech/mcp-changelog/discovery';
const parser = new SchemaParser();
// Parse JSON content
const content = '{"version": "1.0.0", "tools": [{"name": "getUser", ...}]}';
const schema = await parser.parse(content, 'schema.json');
console.log(schema.version); // '1.0.0'
console.log(schema.tools.length); // 1
// Parse with error handling
try {
const badSchema = await parser.parse('{ invalid json }', 'schema.json');
} catch (error) {
if (error instanceof SchemaParseError) {
console.error(error.message);
// "Failed to parse schema.json: Unexpected token 'i' at position 2"
}
}Multi-Schema Repository
import { MultiSchemaAggregator } from '@reaatech/mcp-changelog/discovery';
const aggregator = new MultiSchemaAggregator();
// Discover all schemas in a monorepo
const schemas = await aggregator.aggregate({
ref: 'v1.0.0',
repoPath: '/path/to/monorepo',
patterns: ['packages/*/schema.json', 'services/*/mcp.json']
});
console.log(schemas);
// [
// { path: 'packages/auth/schema.json', schema: {...} },
// { path: 'services/search/mcp.json', schema: {...} }
// ]
// Compare multi-schema between versions
const { oldSchemas, newSchemas } = await aggregator.aggregateRange({
from: 'v1.0.0',
to: 'v2.0.0',
repoPath: '/path/to/monorepo'
});Configuration Options
interface SchemaLocatorConfig {
// File patterns to search for (in priority order)
patterns: string[];
// Glob patterns to exclude
exclude: string[];
// Whether to search recursively
recursive: boolean;
// Maximum depth for recursive search
maxDepth: number;
}
interface SchemaParserConfig {
// Strict parsing mode (fail on unknown fields)
strict: boolean;
// Allowed schema versions
allowedVersions: string[];
// Whether to auto-upgrade old schema formats
autoUpgrade: boolean;
}
const locatorConfig: SchemaLocatorConfig = {
patterns: ['schema.json', 'mcp.json', 'tools.json', '**/*.schema.json'],
exclude: ['node_modules/**', 'dist/**', '.git/**', 'coverage/**'],
recursive: true,
maxDepth: 5,
};
const parserConfig: SchemaParserConfig = {
strict: false,
allowedVersions: ['1.0.0', '2.0.0'],
autoUpgrade: true,
};Schema File Conventions
Auto-detection checks these paths in order (first match wins):
| Priority | Pattern | Description |
| 1 | schema.json | Root-level schema (most common) |
| 2 | mcp.json | Alternative root-level name |
| 3 | tools.json | Alternative root-level name |
| 4 | **/*.schema.json | Glob for multi-schema repos |
| 5 | **/mcp.json | Glob fallback |
Best Practices
1. Provide Helpful Parse Errors
// Good: Actionable error
throw new SchemaParseError(filePath, {
cause: jsonError,
suggestion: 'Check for trailing commas or unquoted keys'
});
// Bad: Generic error
throw new Error('JSON parse error');2. Validate Schema Structure
// Good: Validate after parsing
const schema = await parser.parse(content, path);
if (!schema.version) {
throw new SchemaValidationError('Missing required "version" field');
}
if (!Array.isArray(schema.tools)) {
throw new SchemaValidationError('"tools" must be an array');
}
// Bad: Trust parsed data
const schema = JSON.parse(content); // May be missing required fields3. Handle Missing Schemas Gracefully
// Good: Clear error with suggestions
const schemas = await locator.locate(ref);
if (schemas.length === 0) {
throw new SchemaNotFoundError(ref, {
searched: config.patterns,
suggestion: 'Create a schema.json file or configure custom patterns'
});
}
// Bad: Empty result with no explanation
const schemas = await locator.locate(ref);
if (schemas.length === 0) {
throw new Error('No schemas found');
}Error Handling
// Schema file not found
class SchemaNotFoundError extends Error {
constructor(ref: string, context?: { searched: string[]; suggestion?: string }) {
super(`No schema file found at ref "${ref}"`);
this.name = 'SchemaNotFoundError';
}
}
// Schema parse error
class SchemaParseError extends Error {
constructor(filePath: string, context?: { cause?: Error; suggestion?: string }) {
super(`Failed to parse ${filePath}: ${context?.cause?.message}`);
this.name = 'SchemaParseError';
}
}
// Schema validation error
class SchemaValidationError extends Error {
constructor(message: string) {
super(`Schema validation failed: ${message}`);
this.name = 'SchemaValidationError';
}
}Performance Considerations
- Lazy parsing: Only parse files that match patterns
- Parallel discovery: Check multiple patterns concurrently
- Cache parsed schemas: Avoid re-parsing within a run
- Early termination: Stop at first match for single-schema mode
Testing Strategies
describe('SchemaLocator', () => {
it('should find schema.json at repo root', async () => {
const locator = new SchemaLocator({ repoPath: testRepo });
const schemas = await locator.locate('HEAD');
expect(schemas).toHaveLength(1);
expect(schemas[0].path).toBe('schema.json');
});
it('should handle missing schema gracefully', async () => {
const locator = new SchemaLocator({
repoPath: emptyRepo,
config: { patterns: ['nonexistent.json'], exclude: [] }
});
await expect(locator.locate('HEAD'))
.rejects.toThrow(SchemaNotFoundError);
});
it('should find multiple schemas with glob pattern', async () => {
const locator = new SchemaLocator({
repoPath: monorepo,
config: { patterns: ['packages/*/schema.json'], exclude: [] }
});
const schemas = await locator.locate('HEAD');
expect(schemas.length).toBeGreaterThan(1);
});
});
describe('SchemaParser', () => {
it('should parse valid schema', async () => {
const parser = new SchemaParser();
const schema = await parser.parse(validSchemaJson, 'test.json');
expect(schema.version).toBe('1.0.0');
expect(schema.tools).toHaveLength(3);
});
it('should provide helpful error for malformed JSON', async () => {
const parser = new SchemaParser();
await expect(parser.parse('{ invalid }', 'test.json'))
.rejects.toThrow(SchemaParseError);
});
it('should validate required fields', async () => {
const parser = new SchemaParser();
await expect(parser.parse('{"tools": []}', 'test.json'))
.rejects.toThrow(SchemaValidationError);
});
});Resources
- ARCHITECTURE.md - System architecture
- Schema Discovery section - Detailed module spec
- mcp-schema-evolution types - ToolSnapshot interface
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

