@venizia/ignis-docs 0.0.1-4 → 0.0.1-6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/mcp-server/dist/common/config.d.ts +58 -21
  2. package/mcp-server/dist/common/config.d.ts.map +1 -1
  3. package/mcp-server/dist/common/config.js +67 -12
  4. package/mcp-server/dist/common/config.js.map +1 -1
  5. package/mcp-server/dist/helpers/docs.helper.d.ts +5 -5
  6. package/mcp-server/dist/helpers/docs.helper.d.ts.map +1 -1
  7. package/mcp-server/dist/helpers/docs.helper.js +31 -27
  8. package/mcp-server/dist/helpers/docs.helper.js.map +1 -1
  9. package/mcp-server/dist/helpers/github.helper.d.ts +37 -0
  10. package/mcp-server/dist/helpers/github.helper.d.ts.map +1 -0
  11. package/mcp-server/dist/helpers/github.helper.js +100 -0
  12. package/mcp-server/dist/helpers/github.helper.js.map +1 -0
  13. package/mcp-server/dist/helpers/index.d.ts +1 -0
  14. package/mcp-server/dist/helpers/index.d.ts.map +1 -1
  15. package/mcp-server/dist/helpers/index.js +1 -0
  16. package/mcp-server/dist/helpers/index.js.map +1 -1
  17. package/mcp-server/dist/index.js +60 -32
  18. package/mcp-server/dist/index.js.map +1 -1
  19. package/mcp-server/dist/tools/base.tool.d.ts +6 -10
  20. package/mcp-server/dist/tools/base.tool.d.ts.map +1 -1
  21. package/mcp-server/dist/tools/base.tool.js +3 -5
  22. package/mcp-server/dist/tools/base.tool.js.map +1 -1
  23. package/mcp-server/dist/tools/{get-doc-content.tool.d.ts → docs/get-document-content.tool.d.ts} +4 -4
  24. package/mcp-server/dist/tools/docs/get-document-content.tool.d.ts.map +1 -0
  25. package/mcp-server/dist/tools/{get-doc-content.tool.js → docs/get-document-content.tool.js} +12 -11
  26. package/mcp-server/dist/tools/docs/get-document-content.tool.js.map +1 -0
  27. package/mcp-server/dist/tools/{get-doc-metadata.tool.d.ts → docs/get-document-metadata.tool.d.ts} +4 -4
  28. package/mcp-server/dist/tools/docs/get-document-metadata.tool.d.ts.map +1 -0
  29. package/mcp-server/dist/tools/{get-doc-metadata.tool.js → docs/get-document-metadata.tool.js} +11 -10
  30. package/mcp-server/dist/tools/docs/get-document-metadata.tool.js.map +1 -0
  31. package/mcp-server/dist/tools/docs/get-package-overview.tool.d.ts +50 -0
  32. package/mcp-server/dist/tools/docs/get-package-overview.tool.d.ts.map +1 -0
  33. package/mcp-server/dist/tools/docs/get-package-overview.tool.js +221 -0
  34. package/mcp-server/dist/tools/docs/get-package-overview.tool.js.map +1 -0
  35. package/mcp-server/dist/tools/docs/index.d.ts +7 -0
  36. package/mcp-server/dist/tools/docs/index.d.ts.map +1 -0
  37. package/mcp-server/dist/tools/docs/index.js +23 -0
  38. package/mcp-server/dist/tools/docs/index.js.map +1 -0
  39. package/mcp-server/dist/tools/{list-categories.tool.d.ts → docs/list-categories.tool.d.ts} +2 -2
  40. package/mcp-server/dist/tools/docs/list-categories.tool.d.ts.map +1 -0
  41. package/mcp-server/dist/tools/{list-categories.tool.js → docs/list-categories.tool.js} +7 -6
  42. package/mcp-server/dist/tools/docs/list-categories.tool.js.map +1 -0
  43. package/mcp-server/dist/tools/{list-docs.tool.d.ts → docs/list-documents.tool.d.ts} +4 -4
  44. package/mcp-server/dist/tools/docs/list-documents.tool.d.ts.map +1 -0
  45. package/mcp-server/dist/tools/{list-docs.tool.js → docs/list-documents.tool.js} +10 -9
  46. package/mcp-server/dist/tools/docs/list-documents.tool.js.map +1 -0
  47. package/mcp-server/dist/tools/{search-docs.tool.d.ts → docs/search-documents.tool.d.ts} +4 -4
  48. package/mcp-server/dist/tools/docs/search-documents.tool.d.ts.map +1 -0
  49. package/mcp-server/dist/tools/{search-docs.tool.js → docs/search-documents.tool.js} +19 -18
  50. package/mcp-server/dist/tools/docs/search-documents.tool.js.map +1 -0
  51. package/mcp-server/dist/tools/github/index.d.ts +5 -0
  52. package/mcp-server/dist/tools/github/index.d.ts.map +1 -0
  53. package/mcp-server/dist/tools/github/index.js +21 -0
  54. package/mcp-server/dist/tools/github/index.js.map +1 -0
  55. package/mcp-server/dist/tools/github/list-project-files.tool.d.ts +28 -0
  56. package/mcp-server/dist/tools/github/list-project-files.tool.d.ts.map +1 -0
  57. package/mcp-server/dist/tools/github/list-project-files.tool.js +98 -0
  58. package/mcp-server/dist/tools/github/list-project-files.tool.js.map +1 -0
  59. package/mcp-server/dist/tools/github/search-code.tool.d.ts +42 -0
  60. package/mcp-server/dist/tools/github/search-code.tool.d.ts.map +1 -0
  61. package/mcp-server/dist/tools/github/search-code.tool.js +194 -0
  62. package/mcp-server/dist/tools/github/search-code.tool.js.map +1 -0
  63. package/mcp-server/dist/tools/github/verify-dependencies.tool.d.ts +55 -0
  64. package/mcp-server/dist/tools/github/verify-dependencies.tool.d.ts.map +1 -0
  65. package/mcp-server/dist/tools/github/verify-dependencies.tool.js +167 -0
  66. package/mcp-server/dist/tools/github/verify-dependencies.tool.js.map +1 -0
  67. package/mcp-server/dist/tools/github/view-source-file.tool.d.ts +26 -0
  68. package/mcp-server/dist/tools/github/view-source-file.tool.d.ts.map +1 -0
  69. package/mcp-server/dist/tools/github/view-source-file.tool.js +91 -0
  70. package/mcp-server/dist/tools/github/view-source-file.tool.js.map +1 -0
  71. package/mcp-server/dist/tools/index.d.ts +3 -7
  72. package/mcp-server/dist/tools/index.d.ts.map +1 -1
  73. package/mcp-server/dist/tools/index.js +17 -13
  74. package/mcp-server/dist/tools/index.js.map +1 -1
  75. package/package.json +25 -6
  76. package/wiki/get-started/best-practices/api-usage-examples.md +42 -0
  77. package/wiki/get-started/best-practices/architectural-patterns.md +42 -1
  78. package/wiki/get-started/best-practices/code-style-standards.md +41 -0
  79. package/wiki/get-started/best-practices/contribution-workflow.md +40 -6
  80. package/wiki/get-started/best-practices/data-modeling.md +126 -0
  81. package/wiki/get-started/core-concepts/dependency-injection.md +13 -1
  82. package/wiki/get-started/mcp-docs-server.md +130 -32
  83. package/wiki/get-started/philosophy.md +198 -25
  84. package/wiki/public/logo.svg +1 -0
  85. package/wiki/references/base/application.md +5 -5
  86. package/wiki/references/base/controllers.md +3 -1
  87. package/wiki/references/base/dependency-injection.md +6 -5
  88. package/wiki/references/base/models.md +319 -1
  89. package/wiki/references/components/index.md +3 -1
  90. package/wiki/references/components/static-asset.md +1289 -0
  91. package/wiki/references/helpers/inversion.md +21 -11
  92. package/wiki/references/helpers/storage.md +538 -11
  93. package/wiki/references/src-details/core.md +15 -1
  94. package/wiki/references/src-details/docs.md +19 -9
  95. package/wiki/references/src-details/mcp-server.md +185 -234
  96. package/wiki/references/utilities/index.md +1 -1
  97. package/wiki/references/utilities/request.md +150 -0
  98. package/mcp-server/dist/tools/get-doc-content.tool.d.ts.map +0 -1
  99. package/mcp-server/dist/tools/get-doc-content.tool.js.map +0 -1
  100. package/mcp-server/dist/tools/get-doc-metadata.tool.d.ts.map +0 -1
  101. package/mcp-server/dist/tools/get-doc-metadata.tool.js.map +0 -1
  102. package/mcp-server/dist/tools/list-categories.tool.d.ts.map +0 -1
  103. package/mcp-server/dist/tools/list-categories.tool.js.map +0 -1
  104. package/mcp-server/dist/tools/list-docs.tool.d.ts.map +0 -1
  105. package/mcp-server/dist/tools/list-docs.tool.js.map +0 -1
  106. package/mcp-server/dist/tools/search-docs.tool.d.ts.map +0 -1
  107. package/mcp-server/dist/tools/search-docs.tool.js.map +0 -1
@@ -2,53 +2,81 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const mcp_1 = require("@mastra/mcp");
5
+ const common_1 = require("./common");
5
6
  const helpers_1 = require("./helpers");
6
7
  const tools_1 = require("./tools");
7
8
  // ----------------------------------------------------------------------------
8
9
  // MCP SERVER CONFIGURATION
9
10
  // ----------------------------------------------------------------------------
11
+ const mcpTools = {
12
+ // Documentation Tools
13
+ searchDocs: new tools_1.SearchDocsTool().getTool(),
14
+ getDocContent: new tools_1.GetDocContentTool().getTool(),
15
+ listDocs: new tools_1.ListDocsTool().getTool(),
16
+ listCategories: new tools_1.ListCategoriesTool().getTool(),
17
+ getDocMetadata: new tools_1.GetDocMetadataTool().getTool(),
18
+ getPackageOverview: new tools_1.GetPackageOverviewTool().getTool(),
19
+ // Code & Project Tools
20
+ searchCode: new tools_1.SearchCodeTool().getTool(),
21
+ listProjectFiles: new tools_1.ListProjectFilesTool().getTool(),
22
+ viewSourceFile: new tools_1.ViewSourceFileTool().getTool(),
23
+ verifyDependencies: new tools_1.VerifyDependenciesTool().getTool(),
24
+ };
25
+ const mcpReosources = {
26
+ listResources: async () => {
27
+ const docs = await helpers_1.DocsHelper.load();
28
+ return docs.map(doc => {
29
+ const wordCount = doc.content.split(/\s+/).filter(Boolean).length;
30
+ return {
31
+ uri: `ignis://docs/${doc.id}`,
32
+ name: doc.title,
33
+ description: `${doc.category} - ${wordCount} words`,
34
+ mimeType: 'text/markdown',
35
+ };
36
+ });
37
+ },
38
+ getResourceContent: async ({ uri }) => {
39
+ const id = uri.replace('ignis://docs/', '');
40
+ const content = await helpers_1.DocsHelper.getDocumentContent({ id });
41
+ if (content === null) {
42
+ return { text: `Resource not found: ${id}` };
43
+ }
44
+ return { text: content };
45
+ },
46
+ };
10
47
  const mcpServer = new mcp_1.MCPServer({
11
- name: 'ignis-docs',
12
- version: '0.0.1',
48
+ name: common_1.MCPConfigs.server.name,
49
+ version: common_1.MCPConfigs.server.version,
13
50
  // Register tools using singleton instances
14
- tools: {
15
- search: new tools_1.SearchDocsTool().getTool(),
16
- getDocContent: new tools_1.GetDocContentTool().getTool(),
17
- listDocs: new tools_1.ListDocsTool().getTool(),
18
- listCategories: new tools_1.ListCategoriesTool().getTool(),
19
- getDocMetadata: new tools_1.GetDocMetadataTool().getTool(),
20
- },
51
+ tools: mcpTools,
21
52
  // Resource handlers for direct document access
22
- resources: {
23
- listResources: async () => {
24
- const docs = await helpers_1.DocsHelper.loadDocumentation();
25
- return docs.map(doc => {
26
- const wordCount = doc.content.split(/\s+/).filter(Boolean).length;
27
- return {
28
- uri: `ignis://docs/${doc.id}`,
29
- name: doc.title,
30
- description: `${doc.category} - ${wordCount} words`,
31
- mimeType: 'text/markdown',
32
- };
33
- });
34
- },
35
- getResourceContent: async ({ uri }) => {
36
- const id = uri.replace('ignis://docs/', '');
37
- const content = await helpers_1.DocsHelper.getDocContent({ id });
38
- if (content === null) {
39
- return { text: `Resource not found: ${id}` };
40
- }
41
- return { text: content };
42
- },
43
- },
53
+ resources: mcpReosources,
44
54
  });
45
55
  // ----------------------------------------------------------------------------
56
+ // CLI ARGUMENT PARSING
57
+ // ----------------------------------------------------------------------------
58
+ /**
59
+ * Parse CLI arguments for branch configuration.
60
+ * Usage: node index.js [branch]
61
+ * Example: node index.js develop
62
+ * Default: main
63
+ */
64
+ const parseArgs = () => {
65
+ const args = process.argv.slice(2);
66
+ const branch = args[0] || 'main';
67
+ return { branch };
68
+ };
69
+ // ----------------------------------------------------------------------------
46
70
  // SERVER INITIALIZATION
47
71
  // ----------------------------------------------------------------------------
48
72
  const main = async () => {
73
+ // Parse CLI arguments and configure branch
74
+ const { branch } = parseArgs();
75
+ common_1.MCPConfigs.setBranch({ branch });
49
76
  helpers_1.Logger.info('[main] Initializing Ignis MCP Documentation Server...');
77
+ helpers_1.Logger.info(`[main] GitHub branch: ${common_1.MCPConfigs.github.branch}`);
50
78
  try {
51
- await helpers_1.DocsHelper.loadDocumentation();
79
+ await helpers_1.DocsHelper.load();
52
80
  helpers_1.Logger.info('[main] Documentation loaded successfully.');
53
81
  await mcpServer.startStdio();
54
82
  helpers_1.Logger.info('[main] Server started in Stdio mode.');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AACA,qCAAwC;AACxC,uCAA+C;AAC/C,mCAMiB;AAEjB,+EAA+E;AAC/E,2BAA2B;AAC3B,+EAA+E;AAE/E,MAAM,SAAS,GAAG,IAAI,eAAS,CAAC;IAC9B,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,OAAO;I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@@ -4,10 +4,6 @@ import type { z } from 'zod';
4
4
  * The tool type returned by createTool.
5
5
  */
6
6
  export type TMastraTool = ReturnType<typeof createTool>;
7
- /**
8
- * Re-export createTool for use in subclasses.
9
- */
10
- export { createTool };
11
7
  /**
12
8
  * Abstract base class for all MCP documentation tools.
13
9
  *
@@ -27,11 +23,11 @@ export { createTool };
27
23
  * readonly inputSchema = InputSchema;
28
24
  * readonly outputSchema = OutputSchema;
29
25
  *
30
- * async execute(input: z.infer<typeof InputSchema>) {
26
+ * async execute(opts: z.infer<typeof InputSchema>) {
31
27
  * return { result: 'done' };
32
28
  * }
33
29
  *
34
- * toMastraTool() {
30
+ * getTool() {
35
31
  * return createTool({
36
32
  * id: this.id,
37
33
  * description: this.description,
@@ -43,7 +39,7 @@ export { createTool };
43
39
  * }
44
40
  * ```
45
41
  */
46
- export declare abstract class BaseTool<TInputSchema extends z.ZodType = z.ZodType, TOutputSchema extends z.ZodType = z.ZodType> {
42
+ export declare abstract class BaseTool<TInputSchema extends z.ZodType, TOutputSchema extends z.ZodType> {
47
43
  /**
48
44
  * Unique identifier for the tool.
49
45
  * Used by MCP clients to invoke the tool.
@@ -70,10 +66,10 @@ export declare abstract class BaseTool<TInputSchema extends z.ZodType = z.ZodTyp
70
66
  /**
71
67
  * Executes the tool's main logic.
72
68
  *
73
- * @param input - Validated input matching inputSchema
69
+ * @param opts - Validated options object matching inputSchema
74
70
  * @returns Promise resolving to output matching outputSchema
75
71
  */
76
- abstract execute(input: z.infer<TInputSchema>): Promise<z.infer<TOutputSchema>>;
72
+ abstract execute(opts: z.infer<TInputSchema>): Promise<z.infer<TOutputSchema>>;
77
73
  /**
78
74
  * Converts this tool instance to a Mastra-compatible tool object.
79
75
  * Must be implemented by each subclass to ensure proper type inference.
@@ -82,7 +78,7 @@ export declare abstract class BaseTool<TInputSchema extends z.ZodType = z.ZodTyp
82
78
  *
83
79
  * @example
84
80
  * ```typescript
85
- * toMastraTool() {
81
+ * getTool() {
86
82
  * return createTool({
87
83
  * id: this.id,
88
84
  * description: this.description,
@@ -1 +1 @@
1
- {"version":3,"file":"base.tool.d.ts","sourceRoot":"","sources":["../../tools/base.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAExD;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,CAAC;AAMtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,8BAAsB,QAAQ,CAC5B,YAAY,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,EAC1C,aAAa,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO;IAE3C;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAEtC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IAE5C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IAE9C;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAE/E;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,OAAO,IAAI,WAAW;CAChC"}
1
+ {"version":3,"file":"base.tool.d.ts","sourceRoot":"","sources":["../../tools/base.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAM7B;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAMxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,8BAAsB,QAAQ,CAAC,YAAY,SAAS,CAAC,CAAC,OAAO,EAAE,aAAa,SAAS,CAAC,CAAC,OAAO;IAC5F;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAEtC;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IAE5C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IAE9C;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAE9E;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,OAAO,IAAI,WAAW;CAChC"}
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseTool = exports.createTool = void 0;
4
- const tools_1 = require("@mastra/core/tools");
5
- Object.defineProperty(exports, "createTool", { enumerable: true, get: function () { return tools_1.createTool; } });
3
+ exports.BaseTool = void 0;
6
4
  // ============================================================================
7
5
  // BASE TOOL CLASS
8
6
  // ============================================================================
@@ -25,11 +23,11 @@ Object.defineProperty(exports, "createTool", { enumerable: true, get: function (
25
23
  * readonly inputSchema = InputSchema;
26
24
  * readonly outputSchema = OutputSchema;
27
25
  *
28
- * async execute(input: z.infer<typeof InputSchema>) {
26
+ * async execute(opts: z.infer<typeof InputSchema>) {
29
27
  * return { result: 'done' };
30
28
  * }
31
29
  *
32
- * toMastraTool() {
30
+ * getTool() {
33
31
  * return createTool({
34
32
  * id: this.id,
35
33
  * description: this.description,
@@ -1 +1 @@
1
- {"version":3,"file":"base.tool.js","sourceRoot":"","sources":["../../tools/base.tool.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAevC,2FAfA,kBAAU,OAeA;AAEnB,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAsB,QAAQ;CA2D7B;AA3DD,4BA2DC"}
1
+ {"version":3,"file":"base.tool.js","sourceRoot":"","sources":["../../tools/base.tool.ts"],"names":[],"mappings":";;;AAYA,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAsB,QAAQ;CAwD7B;AAxDD,4BAwDC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { BaseTool, type TMastraTool } from './base.tool';
2
+ import { BaseTool, TMastraTool } from '../base.tool';
3
3
  declare const InputSchema: z.ZodObject<{
4
4
  id: z.ZodString;
5
5
  }, z.core.$strip>;
@@ -9,7 +9,7 @@ declare const OutputSchema: z.ZodObject<{
9
9
  error: z.ZodOptional<z.ZodString>;
10
10
  }, z.core.$strip>;
11
11
  export declare class GetDocContentTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
12
- readonly id = "getDocContent";
12
+ readonly id = "getDocumentContent";
13
13
  readonly description = "\nRetrieves the complete markdown content of a specific Ignis Framework documentation file.\n\nPURPOSE:\nUse this tool to fetch the full text of a documentation page when you need detailed information\nbeyond what search snippets provide. This is your primary tool for reading documentation content.\n\nWHEN TO USE:\n- After searchDocs returns relevant results and you need full content\n- When user asks for detailed explanation of a specific topic\n- To read code examples, API references, or configuration guides\n- When you need to quote or reference specific documentation sections\n\nWHEN NOT TO USE:\n- Don't use this for discovery - use searchDocs or listDocs first\n- Don't fetch multiple documents blindly - review search results first\n\nDOCUMENT ID FORMAT:\nThe 'id' parameter is the relative file path from the wiki root:\n- \"get-started/quickstart.md\" - Quickstart guide\n- \"references/components/http-server.md\" - HTTP Server component reference\n- \"get-started/core-concepts/dependency-injection.md\" - DI concepts\n\nHOW TO GET VALID IDs:\n1. Use searchDocs to find documents by keyword\n2. Use listDocs to browse all available documents\n3. Use listCategories + listDocs(category) for structured browsing\n\nOUTPUT:\nReturns full markdown content suitable for:\n- Answering user questions with accurate information\n- Extracting code examples\n- Understanding API usage patterns\n- Providing step-by-step guidance\n";
14
14
  readonly inputSchema: z.ZodObject<{
15
15
  id: z.ZodString;
@@ -19,8 +19,8 @@ export declare class GetDocContentTool extends BaseTool<typeof InputSchema, type
19
19
  content: z.ZodOptional<z.ZodString>;
20
20
  error: z.ZodOptional<z.ZodString>;
21
21
  }, z.core.$strip>;
22
- execute(input: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
22
+ execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
23
23
  getTool(): TMastraTool;
24
24
  }
25
25
  export {};
26
- //# sourceMappingURL=get-doc-content.tool.d.ts.map
26
+ //# sourceMappingURL=get-document-content.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-document-content.tool.d.ts","sourceRoot":"","sources":["../../../tools/docs/get-document-content.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAqFrD,QAAA,MAAM,WAAW;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;iBAOhB,CAAC;AAMH,qBAAa,iBAAkB,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACtF,QAAQ,CAAC,EAAE,wBAAwB;IACnC,QAAQ,CAAC,WAAW,o6CAAoB;IACxC,QAAQ,CAAC,WAAW;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAUvF,OAAO,IAAI,WAAW;CASvB"}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetDocContentTool = void 0;
4
+ const tools_1 = require("@mastra/core/tools");
4
5
  const zod_1 = require("zod");
5
- const helpers_1 = require("../helpers");
6
- const base_tool_1 = require("./base.tool");
6
+ const base_tool_1 = require("../base.tool");
7
+ const helpers_1 = require("@/mcp-server/helpers");
7
8
  // ----------------------------------------------------------------------------
8
9
  // DESCRIPTIONS
9
10
  // ----------------------------------------------------------------------------
@@ -98,27 +99,27 @@ const OutputSchema = zod_1.z.object({
98
99
  class GetDocContentTool extends base_tool_1.BaseTool {
99
100
  constructor() {
100
101
  super(...arguments);
101
- this.id = 'getDocContent';
102
+ this.id = 'getDocumentContent';
102
103
  this.description = TOOL_DESCRIPTION;
103
104
  this.inputSchema = InputSchema;
104
105
  this.outputSchema = OutputSchema;
105
106
  }
106
- async execute(input) {
107
- const content = await helpers_1.DocsHelper.getDocContent({ id: input.id });
107
+ async execute(opts) {
108
+ const content = await helpers_1.DocsHelper.getDocumentContent({ id: opts.id });
108
109
  if (!content) {
109
- return { error: 'Document not found', id: input.id };
110
+ return { error: 'Document not found', id: opts.id };
110
111
  }
111
- return { content, id: input.id };
112
+ return { content, id: opts.id };
112
113
  }
113
114
  getTool() {
114
- return (0, base_tool_1.createTool)({
115
+ return (0, tools_1.createTool)({
115
116
  id: this.id,
116
117
  description: this.description,
117
- inputSchema: InputSchema,
118
- outputSchema: OutputSchema,
118
+ inputSchema: this.inputSchema,
119
+ outputSchema: this.outputSchema,
119
120
  execute: async ({ context }) => this.execute(context),
120
121
  });
121
122
  }
122
123
  }
123
124
  exports.GetDocContentTool = GetDocContentTool;
124
- //# sourceMappingURL=get-doc-content.tool.js.map
125
+ //# sourceMappingURL=get-document-content.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-document-content.tool.js","sourceRoot":"","sources":["../../../tools/docs/get-document-content.tool.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAChD,6BAAwB;AACxB,4CAAqD;AACrD,kDAAkD;AAElD,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCxB,CAAC;AAEF,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;CAmBtB,CAAC;AAEF,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;CAe3B,CAAC;AAEF,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;CAC/C,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC9D,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC5D,KAAK,EAAE,OAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kFAAkF,CAAC;CAChG,CAAC,CAAC;AAEH,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E,MAAa,iBAAkB,SAAQ,oBAAiD;IAAxF;;QACW,OAAE,GAAG,oBAAoB,CAAC;QAC1B,gBAAW,GAAG,gBAAgB,CAAC;QAC/B,gBAAW,GAAG,WAAW,CAAC;QAC1B,iBAAY,GAAG,YAAY,CAAC;IAqBvC,CAAC;IAnBC,KAAK,CAAC,OAAO,CAAC,IAAiC;QAC7C,MAAM,OAAO,GAAG,MAAM,oBAAU,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QAErE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;QACtD,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;IAClC,CAAC;IAED,OAAO;QACL,OAAO,IAAA,kBAAU,EAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AAzBD,8CAyBC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { BaseTool, type TMastraTool } from './base.tool';
2
+ import { BaseTool, TMastraTool } from '../base.tool';
3
3
  declare const InputSchema: z.ZodObject<{
4
4
  id: z.ZodString;
5
5
  }, z.core.$strip>;
@@ -14,7 +14,7 @@ declare const OutputSchema: z.ZodObject<{
14
14
  error: z.ZodOptional<z.ZodString>;
15
15
  }, z.core.$strip>;
16
16
  export declare class GetDocMetadataTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
17
- readonly id = "getDocMetadata";
17
+ readonly id = "getDocumentMetadata";
18
18
  readonly description = "\nRetrieves statistical metadata about a specific Ignis Framework documentation file\nwithout fetching its full content.\n\nPURPOSE:\nUse this tool to get information ABOUT a document (size, word count, last modified)\nwithout retrieving the actual content. Useful for assessing documents before reading them fully.\n\nWHEN TO USE:\n- To check document length before fetching full content\n- To estimate reading time or complexity\n- To verify a document exists and get basic info\n- To check when documentation was last updated\n- When you need document stats for comparison or reporting\n\nWHEN NOT TO USE:\n- When you need the actual document content (use getDocContent instead)\n- For searching documents (use searchDocs instead)\n- For listing multiple documents (use listDocs instead)\n\nMETADATA FIELDS EXPLAINED:\n- wordCount: Total words in content body (excludes frontmatter)\n - Quick read: < 500 words\n - Medium: 500-1500 words\n - Long/detailed: > 1500 words\n\n- charCount: Total characters (useful for token estimation)\n - Rough token estimate: charCount / 4 for English text\n\n- lastModified: File modification timestamp\n - Recent = actively maintained documentation\n - Old = may need verification for accuracy\n\n- size: Raw file size in bytes (includes frontmatter YAML)\n\nUSE CASES:\n1. \"Is this document long?\" \u2192 Check wordCount\n2. \"Will this fit in context?\" \u2192 Check charCount, estimate tokens\n3. \"Is this documentation current?\" \u2192 Check lastModified\n4. \"Which document is more detailed?\" \u2192 Compare wordCounts\n";
19
19
  readonly inputSchema: z.ZodObject<{
20
20
  id: z.ZodString;
@@ -29,8 +29,8 @@ export declare class GetDocMetadataTool extends BaseTool<typeof InputSchema, typ
29
29
  size: z.ZodOptional<z.ZodNumber>;
30
30
  error: z.ZodOptional<z.ZodString>;
31
31
  }, z.core.$strip>;
32
- execute(input: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
32
+ execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
33
33
  getTool(): TMastraTool;
34
34
  }
35
35
  export {};
36
- //# sourceMappingURL=get-doc-metadata.tool.d.ts.map
36
+ //# sourceMappingURL=get-document-metadata.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-document-metadata.tool.d.ts","sourceRoot":"","sources":["../../../tools/docs/get-document-metadata.tool.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAwErD,QAAA,MAAM,WAAW;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;iBAmBhB,CAAC;AAMH,qBAAa,kBAAmB,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACvF,QAAQ,CAAC,EAAE,yBAAyB;IACpC,QAAQ,CAAC,WAAW,6iDAAoB;IACxC,QAAQ,CAAC,WAAW;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;;;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAavF,OAAO,IAAI,WAAW;CASvB"}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetDocMetadataTool = void 0;
4
+ const helpers_1 = require("@/mcp-server/helpers");
5
+ const tools_1 = require("@mastra/core/tools");
4
6
  const zod_1 = require("zod");
5
- const helpers_1 = require("../helpers");
6
- const base_tool_1 = require("./base.tool");
7
+ const base_tool_1 = require("../base.tool");
7
8
  // ----------------------------------------------------------------------------
8
9
  // DESCRIPTIONS
9
10
  // ----------------------------------------------------------------------------
@@ -99,15 +100,15 @@ const OutputSchema = zod_1.z.object({
99
100
  class GetDocMetadataTool extends base_tool_1.BaseTool {
100
101
  constructor() {
101
102
  super(...arguments);
102
- this.id = 'getDocMetadata';
103
+ this.id = 'getDocumentMetadata';
103
104
  this.description = TOOL_DESCRIPTION;
104
105
  this.inputSchema = InputSchema;
105
106
  this.outputSchema = OutputSchema;
106
107
  }
107
- async execute(input) {
108
- const metadata = await helpers_1.DocsHelper.getDocMetadata({ id: input.id });
108
+ async execute(opts) {
109
+ const metadata = await helpers_1.DocsHelper.getDocumentMetadata({ id: opts.id });
109
110
  if (!metadata) {
110
- return { error: 'Document not found', id: input.id };
111
+ return { error: 'Document not found', id: opts.id };
111
112
  }
112
113
  return {
113
114
  ...metadata,
@@ -115,14 +116,14 @@ class GetDocMetadataTool extends base_tool_1.BaseTool {
115
116
  };
116
117
  }
117
118
  getTool() {
118
- return (0, base_tool_1.createTool)({
119
+ return (0, tools_1.createTool)({
119
120
  id: this.id,
120
121
  description: this.description,
121
- inputSchema: InputSchema,
122
- outputSchema: OutputSchema,
122
+ inputSchema: this.inputSchema,
123
+ outputSchema: this.outputSchema,
123
124
  execute: async ({ context }) => this.execute(context),
124
125
  });
125
126
  }
126
127
  }
127
128
  exports.GetDocMetadataTool = GetDocMetadataTool;
128
- //# sourceMappingURL=get-doc-metadata.tool.js.map
129
+ //# sourceMappingURL=get-document-metadata.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-document-metadata.tool.js","sourceRoot":"","sources":["../../../tools/docs/get-document-metadata.tool.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,8CAAgD;AAChD,6BAAwB;AACxB,4CAAqD;AAErD,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCxB,CAAC;AAEF,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;CAkBtB,CAAC;AAEF,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;CAC/C,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC9D,KA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ACtD,CAAC;QAED,OAAO;YACL,GAAG,QAAQ;YACX,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,WAAW,EAAE;SACnD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,IAAA,kBAAU,EAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AA5BD,gDA4BC"}
@@ -0,0 +1,50 @@
1
+ import { z } from 'zod';
2
+ import { BaseTool, type TMastraTool } from '../base.tool';
3
+ declare const InputSchema: z.ZodObject<{
4
+ packageName: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>;
6
+ declare const OutputSchema: z.ZodObject<{
7
+ packages: z.ZodArray<z.ZodObject<{
8
+ name: z.ZodString;
9
+ npmName: z.ZodString;
10
+ description: z.ZodString;
11
+ directories: z.ZodArray<z.ZodObject<{
12
+ name: z.ZodString;
13
+ purpose: z.ZodString;
14
+ }, z.core.$strip>>;
15
+ content: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>>;
17
+ error: z.ZodOptional<z.ZodString>;
18
+ }, z.core.$strip>;
19
+ export declare class GetPackageOverviewTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
20
+ readonly id = "getPackageOverview";
21
+ readonly description = "\nReturns an overview of Ignis packages from the source details documentation.\n\nPURPOSE:\nProvides AI agents with comprehensive understanding of the Ignis monorepo structure,\npackage purposes, main exports, and directory layouts. This is essential for helping\nusers understand which package to use for specific features.\n\nWHEN TO USE:\n- When user asks \"what packages does Ignis have?\"\n- When user needs to understand project structure\n- When user asks which package provides a specific feature\n- Before helping user implement a feature (to know where code should go)\n- When user asks about imports or package dependencies\n\nWHEN NOT TO USE:\n- For specific API documentation (use getDocContent with references/ docs)\n- For code examples (use searchCode or getDocContent)\n- For troubleshooting (use searchDocs)\n\nOUTPUT:\nReturns package name, description, main directories, and key components.\nThe content comes from wiki/references/src-details/ documentation.\n";
22
+ readonly inputSchema: z.ZodObject<{
23
+ packageName: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ readonly outputSchema: z.ZodObject<{
26
+ packages: z.ZodArray<z.ZodObject<{
27
+ name: z.ZodString;
28
+ npmName: z.ZodString;
29
+ description: z.ZodString;
30
+ directories: z.ZodArray<z.ZodObject<{
31
+ name: z.ZodString;
32
+ purpose: z.ZodString;
33
+ }, z.core.$strip>>;
34
+ content: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>>;
36
+ error: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>;
38
+ /**
39
+ * Extracts package description from first paragraph after title
40
+ */
41
+ private extractDescription;
42
+ /**
43
+ * Extracts directory table from markdown content
44
+ */
45
+ private extractDirectories;
46
+ execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
47
+ getTool(): TMastraTool;
48
+ }
49
+ export {};
50
+ //# sourceMappingURL=get-package-overview.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-package-overview.tool.d.ts","sourceRoot":"","sources":["../../../tools/docs/get-package-overview.tool.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAgE1D,QAAA,MAAM,WAAW;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;;;;;;;;;iBAGhB,CAAC;AAmBH,qBAAa,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IAC3F,QAAQ,CAAC,EAAE,wBAAwB;IACnC,QAAQ,CAAC,WAAW,09BAAoB;IACxC,QAAQ,CAAC,WAAW;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;;;;;;;;;sBAAgB;IAErC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA8B1B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA0CpB,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAuDvF,OAAO,IAAI,WAAW;CASvB"}