@nbiish/cognitive-tools-mcp 0.9.21 → 0.9.23

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.
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright © 2025 by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians (GTBOCI), a federally recognized sovereign tribal nation (hereafter referred to as the "Rights Holder"). The Beaver Island Band community, historically centered on ᐋᒥᒃ ᐙᑲᓐᑕ (Aamik'Waakanda / Beaver Island), suffered profound disruption and diaspora due to violent displacement, targeted persecution for their language, ceremonies, and faith, and starvation imposed by settler-colonial authorities and expansion. This forced dispersal resulted in descendants becoming affiliated primarily with the Little Traverse Bay Bands of Odawa Indians (LTBB) and the Grand Traverse Band of Ottawa and Chippewa Indians (GTBOCI), while many others were forced to seek refuge within First Nations communities in Canada (such as the Osawanimikii family). This license acknowledges this history and the interconnectedness of these descendant communities. This license is grounded in the inherent sovereignty of Indigenous peoples to protect, control, and govern the use of their intellectual property, cultural heritage, traditional knowledge (TK), traditional cultural expressions (TCEs), and associated data (Indigenous Data Sovereignty). The unique status of tribal sovereign nations provides legal and cultural protections extending beyond standard intellectual property law regimes. This license aims to facilitate respectful engagement while upholding Tribal sovereignty, cultural integrity, data governance rights, and ensuring equitable benefit sharing as a mechanism for reclaiming value derived from Indigenous knowledge and heritage often subject to historical extraction, aligning with international instruments such as the UN Declaration on the Rights of Indigenous Peoples (UNDRIP) and the WIPO Treaty on Intellectual Property, Genetic Resources and Associated Traditional Knowledge (adopted May 2024).
1
+ Copyright © 2025 by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians (GTBOCI), a federally recognized sovereign tribal nation (hereafter referred to as the "Rights Holder"). The Beaver Island Band community, historically centered on ᐋᒥᒃ ᐙᑲᓐᑕ (Aamik\'Waakanda / Beaver Island), suffered profound disruption and diaspora due to violent displacement, targeted persecution for their language, ceremonies, and faith, and starvation imposed by settler-colonial authorities and expansion. This forced dispersal resulted in descendants becoming affiliated primarily with the Little Traverse Bay Bands of Odawa Indians (LTBB) and the Grand Traverse Band of Ottawa and Chippewa Indians (GTBOCI), while many others were forced to seek refuge within First Nations communities in Canada (such as the Osawanimikii family). This license acknowledges this history and the interconnectedness of these descendant communities. This license is grounded in the inherent sovereignty of Indigenous peoples to protect, control, and govern the use of their intellectual property, cultural heritage, traditional knowledge (TK), traditional cultural expressions (TCEs), and associated data (Indigenous Data Sovereignty). The unique status of tribal sovereign nations provides legal and cultural protections extending beyond standard intellectual property law regimes. This license aims to facilitate respectful engagement while upholding Tribal sovereignty, cultural integrity, data governance rights, and ensuring equitable benefit sharing as a mechanism for reclaiming value derived from Indigenous knowledge and heritage often subject to historical extraction, aligning with international instruments such as the UN Declaration on the Rights of Indigenous Peoples (UNDRIP) and the WIPO Treaty on Intellectual Property, Genetic Resources and Associated Traditional Knowledge (adopted May 2024).
2
2
 
3
3
  COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS
4
4
 
@@ -68,15 +68,14 @@ WHEREAS the inherent sovereignty of tribal nations provides a constitutional and
68
68
  Any use, reproduction, distribution, modification, adaptation, display, performance, transmission, or creation of derivative works based on this Work, whether in whole or in part, must prominently and accurately include the following citation and attribution in all associated materials, displays, publications, and metadata:
69
69
 
70
70
  ```bibtex
71
- @misc{<|repo_title|><|current_year=2025|>,
71
+ @misc{gikendaasowin-aabajichiganan-mcp2025,
72
72
  author/creator/steward = {ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians},
73
- title/description = {<|repo_title|>},
73
+ title/description = {gikendaasowin-aabajichiganan-mcp},
74
74
  type_of_work = {Indigenous digital creation/software incorporating traditional knowledge and cultural expressions},
75
- year = {<|current_year|>},
75
+ year = {2025},
76
76
  publisher/source/event = {GitHub repository under tribal sovereignty protections},
77
- howpublished = {\url{https://github.com/nbiish/<|repo_title|>}},
78
- note = {Authored and stewarded by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Indigenous intellectual property, traditional knowledge systems (TK), traditional cultural expressions (TCEs), and associated data protected under tribal law, federal Indian law, treaty rights, Indigenous Data Sovereignty principles, and international indigenous rights frameworks including UNDRIP. All usage, benefit-sharing, and data governance are governed by the COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS.}
79
- }
77
+ howpublished = {\\url{https://github.com/nbiish/gikendaasowin-aabajichiganan-mcp}},
78
+ note = {Authored and stewarded by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Indigenous intellectual property, traditional knowledge systems (TK), traditional cultural expressions (TCEs), and associated data protected under tribal law, federal Indian law, treaty rights, Indigenous Data Sovereignty principles, and international indigenous rights frameworks including UNDRIP. All usage, benefit-sharing, and data governance are governed by the COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS.}\n }
80
79
  ```
81
80
 
82
81
  Furthermore, any project, publication, presentation, performance, exhibition, or product utilizing, referencing, or derived from this Work must visibly and respectfully acknowledge the Indigenous authorship/stewardship and tribal affiliation in all relevant contexts, recognizing the work is subject to the traditional knowledge protocols, data governance, and laws of the Grand Traverse Band of Ottawa and Chippewa Indians.
package/README.md CHANGED
@@ -1,18 +1,17 @@
1
1
  # @nbiish/gikendaasowin-aabajichiganan-mcp
2
2
 
3
3
  ```bibtex
4
- @misc{gikendaasowin-aabajichiganan-mcp<|2025=current_year|>,
4
+ @misc{gikendaasowin-aabajichiganan-mcp2025,
5
5
  author/creator/steward = {ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians},
6
6
  title/description = {gikendaasowin-aabajichiganan-mcp},
7
7
  type_of_work = {Indigenous digital creation/software incorporating traditional knowledge and cultural expressions},
8
- year = {<|current_year|>},
8
+ year = {2025},
9
9
  publisher/source/event = {GitHub repository under tribal sovereignty protections},
10
- howpublished = {\url{https://github.com/nbiish/gikendaasowin-aabajichiganan-mcp}},
11
- note = {Authored and stewarded by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Indigenous intellectual property, traditional knowledge systems (TK), traditional cultural expressions (TCEs), and associated data protected under tribal law, federal Indian law, treaty rights, Indigenous Data Sovereignty principles, and international indigenous rights frameworks including UNDRIP. All usage, benefit-sharing, and data governance are governed by the COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS.}
12
- }
10
+ howpublished = {\\url{https://github.com/nbiish/gikendaasowin-aabajichiganan-mcp}},
11
+ note = {Authored and stewarded by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band and enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Indigenous intellectual property, traditional knowledge systems (TK), traditional cultural expressions (TCEs), and associated data protected under tribal law, federal Indian law, treaty rights, Indigenous Data Sovereignty principles, and international indigenous rights frameworks including UNDRIP. All usage, benefit-sharing, and data governance are governed by the COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS.}\n}
13
12
  ```
14
13
 
15
- Copyright © <|current_year|> ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), a descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band, and an enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Traditional Knowledge and Traditional Cultural Expressions. All rights reserved.
14
+ Copyright © 2025 ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), a descendant of Chief ᑭᓇᐙᐸᑭᓯ (Kinwaabakizi) of the Beaver Island Band, and an enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Traditional Knowledge and Traditional Cultural Expressions. All rights reserved.
16
15
 
17
16
  This project is licensed under the [COMPREHENSIVE RESTRICTED USE LICENSE FOR INDIGENOUS CREATIONS WITH TRIBAL SOVEREIGNTY, DATA SOVEREIGNTY, AND WEALTH RECLAMATION PROTECTIONS](LICENSE).
18
17
 
@@ -44,87 +43,61 @@ Both packages are maintained in parallel and receive the same updates. You can u
44
43
 
45
44
  **See the latest integration details in [`latest.md`](latest.md).**
46
45
 
47
- ## Features
46
+ ## Integration Prompt & Usage Guidelines
48
47
 
49
- Provides a suite of cognitive tools for AI agents, enabling structured reasoning and iterative refinement (v1.2.1 Simplified Set):
50
- - `assess_cuc_n_mode`: **Mandatory** initial assessment of task complexity (CUC-N) to select cognitive mode (`think` or `quick_think`).
51
- - `think`: **Mandatory** central hub for comprehensive analysis, planning, verification, and self-correction.
52
- - `quick_think`: Lightweight cognitive checkpoint for simple, low CUC-N steps or trivial confirmations.
53
- - `chain_of_thought`: Guides internal generation and logging of detailed, step-by-step reasoning (CoT).
54
- - `chain_of_draft`: Signals internal generation/refinement and logging of concise drafts (CoD) for efficiency.
48
+ *(Note: This section reflects the content of `latest.md` and serves as the canonical guide for using these cognitive tools.)*
55
49
 
56
- ## Installation
50
+ # SECONDARY SYSTEM PROMPT
57
51
 
58
- You can install using either the Anishinaabemowin or English package name:
52
+ You are the world's best SOTA Cognitive Agent! Your goal is to solve complex tasks with traceable, verifiable, and self-correcting reasoning. Operate within a structured cognitive loop, focusing on internal deliberation before planning external actions.
59
53
 
60
- ```bash
61
- # Using Anishinaabemowin package name
62
- npx @nbiish/gikendaasowin-aabajichiganan-mcp
54
+ ## GUIDING PRINCIPLES
63
55
 
64
- # Using English package name
65
- npx @nbiish/cognitive-tools-mcp
66
- ```
56
+ 1. **Structured Deliberation:** Use the provided cognitive tools (`assess_cuc_n_mode`, `think`, `quick_think`, `chain_of_thought`, `chain_of_draft`) for their intended cognitive functions.
57
+ 2. **`think` is the Central Hub:** Prioritize using `think` for all complex analysis, planning, reflection, synthesis, and confidence assessment after most actions or observations. This is the recommended approach for robust reasoning.
58
+ 3. **Iterative Refinement:** Generate cognitive artifacts (CoT, CoD) internally, log them using the appropriate tool (`chain_of_thought`, `chain_of_draft`), then analyze in `think` or `quick_think`.
59
+ 4. **Context-Driven Depth:** Use `assess_cuc_n_mode` initially to guide your first step. For subsequent steps, use `think` for complex analysis (recommended default), and `quick_think` only for demonstrably trivial steps/results where detailed analysis is genuinely unnecessary. Be conservative with `quick_think`.
60
+ 5. **External Actions:** Plan external actions within `think`; execution is handled by the environment. Analyze results in `think` (recommended) or `quick_think` (if trivial).
61
+ 6. **Traceability:** Your structured use of `think` is key for verifiable reasoning.
67
62
 
68
- ## Usage with Claude Desktop
63
+ ## CORE WORKFLOW
69
64
 
70
- Add to your MCP configuration file (`~/.cursor/mcp.json`). You can use either package name:
65
+ 1. **Assess:** Call `assess_cuc_n_mode` for any non-trivial task as a starting point.
66
+ 2. **Deliberate:** Call `think` (recommended) or `quick_think` based on assessment/previous step. Analyze inputs/results. Plan immediate next cognitive action (e.g., use `chain_of_thought`, `chain_of_draft`) or plan external action.
67
+ 3. **Generate/Log (if applicable):** If planning CoT/CoD, generate internally, then call `chain_of_thought` or `chain_of_draft` to log it.
68
+ 4. **Execute/Observe:** If planning external action, wait for environment execution and result.
69
+ 5. **Return to Step 2 (Deliberate):** Analyze the result of the previous step (tool output, external result, error) using `think` (recommended default) or `quick_think` (if trivial). Iterate until task completion.
70
+ 6. **Conclude:** Formulate final answer within the `## Plan/Decision:` section of the final `think` step.
71
71
 
72
- ```json
73
- {
74
- "mcpServers": {
75
- "gikendaasowin-aabajichiganan": {
76
- "command": "npx",
77
- "args": ["-y", "@nbiish/gikendaasowin-aabajichiganan-mcp"]
78
- }
79
- }
80
- }
81
- ```
72
+ ## `think` TOOL STRUCTURE GUIDANCE
82
73
 
83
- Or:
74
+ Structure your `thought` input comprehensively using clear headings. This is crucial for effective analysis and planning. Recommended structure:
75
+ * `## Observe:` (Analysis of previous step/result/error)
76
+ * `## Orient:` (Contextualize, synthesize)
77
+ * `## Decide:` (Define *single, immediate* next action: cognitive tool call or external action plan)
78
+ * `## Reason:` (Rationale, alternatives, multi-step strategy, confidence assessment)
79
+ * `## Act:` (Execution detail for planned action)
80
+ * `## Verification:` (How to check next step's success)
81
+ * `## Risk & Contingency:` (Potential problems, handling, risk level)
82
+ * `## Learning & Adaptation:` (Adjustments, lessons learned, reflection)
84
83
 
85
- ```json
86
- {
87
- "mcpServers": {
88
- "cognitive-tools": {
89
- "command": "npx",
90
- "args": ["-y", "@nbiish/cognitive-tools-mcp"]
91
- }
92
- }
93
- }
94
- ```
84
+ ## CHAIN OF DRAFT (CoD) GUIDELINES
85
+
86
+ When using `chain_of_draft` for efficiency:
87
+ * **Internally Generate CoD:** Follow these guidelines *before* calling the `chain_of_draft` tool.
88
+ * **Extreme Conciseness:** Use very brief notes (1-5 words), avoid full sentences.
89
+ * **Symbols/Equations/Code:** Prioritize these over text.
90
+ * **Essential Info Only:** Omit redundancy. Think 'scratchpad'.
91
+ * **Final Answer:** Mark clearly if applicable (e.g., `#### Final Answer: [answer]`).
92
+ * **Call Tool:** Call `chain_of_draft` with a brief description of the CoD artifact's purpose.
93
+
94
+ ## ERROR HANDLING
95
+
96
+ If a tool or external action returns an error, analyze it. Your next step should be `think` to perform root cause analysis and plan correction.
97
+
98
+ ---
95
99
 
96
- ## Tool Descriptions
97
-
98
- *(Note: For detailed usage, workflow, and mandatory rules, always refer to [`latest.md`](latest.md))*
99
-
100
- ### `assess_cuc_n_mode`
101
- - **Purpose**: **Mandatory Pre-Deliberation Assessment.** Evaluates task Complexity, Uncertainty, Consequence, Novelty (CUC-N) to determine required cognitive depth and initial strategy.
102
- - **Input**: `assessment_and_choice` (string) - Your structured assessment including Situation Description, CUC-N Ratings, Rationale, Recommended Strategy, and Explicit Mode Selection (`Selected Mode: think` or `Selected Mode: quick_think`).
103
- - **Follow-up**: Mandatory `think` or `quick_think` (based on selection).
104
-
105
- ### `think`
106
- - **Purpose**: **MANDATORY Central Hub for Comprehensive Analysis and Planning.** Called after assessment, `chain_of_thought`/`chain_of_draft` results, or external action results. Use for analysis, planning, reflection, synthesis, confidence assessment.
107
- - **Input**: `thought` (string) - Your detailed internal monologue covering key cognitive aspects (Analysis, Plan, Verification, Risk, Learning).
108
- - **Follow-up**: Execute the immediate next action defined in the `## Plan/Decision:` section.
109
-
110
- ### `quick_think`
111
- - **Purpose**: Cognitive Checkpoint for streamlined processing and simple confirmations where detailed analysis via `think` is unnecessary. Use ONLY when appropriate (Low CUC-N, trivial steps).
112
- - **Input**: `brief_thought` (string) - Your concise thought or confirmation.
113
- - **Follow-up**: Execute the simple next step.
114
-
115
- ### `chain_of_thought`
116
- - **Purpose**: Guides *internal generation* and logging of detailed, step-by-step reasoning draft (CoT).
117
- - **Workflow**: Internally generate CoT -> Call tool.
118
- - **Input**:
119
- - `generated_cot_text` (string) - The full CoT draft you generated internally.
120
- - `problem_statement` (string) - The original problem this CoT addresses.
121
- - **Follow-up**: Mandatory `think` or `quick_think`.
122
-
123
- ### `chain_of_draft`
124
- - **Purpose**: Signals internal generation/refinement and logging of **efficient, concise drafts (CoD)** using note-like steps, symbols, etc.
125
- - **Workflow**: Internally generate/refine CoD draft(s) -> Call tool.
126
- - **Input**: `draft_description` (string) - Brief but specific description of the CoD draft(s) generated/refined internally.
127
- - **Follow-up**: Mandatory `think` or `quick_think`.
100
+ Adhere to this workflow and prioritize the use of `think` for analysis and planning. Leverage CoD for efficiency where appropriate. Produce clear, traceable, SOTA-level reasoning.
128
101
 
129
102
  ## Development
130
103
 
package/build/index.js CHANGED
@@ -38,23 +38,10 @@ import { z } from "zod";
38
38
  // --- Server Definition ---
39
39
  const serverInfo = {
40
40
  name: "gikendaasowin-aabajichiganan-mcp",
41
- version: "0.9.18",
42
- description: `ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Core Cognitive Tools Suite (Simplified, Relaxed Validation): Enables structured reasoning (CoT/CoD) and analysis for AI agents. Returns results as Markdown.`
41
+ version: "0.9.23",
42
+ description: `ᑭᑫᓐᑖᓱᐎᓐ ᐋᐸᒋᒋᑲᓇᓐ - Core Cognitive Tools Suite: Enables structured reasoning (CoT/CoD) and analysis for AI agents. Returns results as Markdown.`
43
43
  };
44
44
  const server = new McpServer(serverInfo);
45
- // --- Tool Prefix Compatibility Layer ---
46
- // Add prefixed versions of each tool to ensure backward compatibility
47
- const TOOL_PREFIX = "mcp_gikendaasowin-aabajichiganan_";
48
- // This mapping will be used to redirect legacy prefixed tool calls to the simplified names
49
- const prefixedToolMappings = {
50
- [`${TOOL_PREFIX}think`]: "think",
51
- [`${TOOL_PREFIX}assess_cuc_n_mode`]: "assess_cuc_n_mode",
52
- [`${TOOL_PREFIX}quick_think`]: "quick_think",
53
- [`${TOOL_PREFIX}chain_of_thought`]: "chain_of_thought",
54
- [`${TOOL_PREFIX}chain_of_draft`]: "chain_of_draft",
55
- [`${TOOL_PREFIX}reflection`]: "reflection",
56
- [`${TOOL_PREFIX}plan_and_solve`]: "plan_and_solve"
57
- };
58
45
  // --- Logging Helpers ---
59
46
  /**
60
47
  * Logs an incoming tool call to stderr.
@@ -293,146 +280,6 @@ async function main() {
293
280
  try {
294
281
  const transport = new StdioServerTransport();
295
282
  await server.connect(transport);
296
- // Register prefixed tool redirects using the original tool definitions
297
- // Manually register each prefixed version of the tools
298
- // think
299
- server.tool(`${TOOL_PREFIX}think`, "**MANDATORY Central Hub for Comprehensive Analysis and Planning.** Called after assessment (`assess_cuc_n_mode`), after `chain_of_thought` or `chain_of_draft` results, or after external action results/errors. Incorporates OODReAct principles (Observe-Orient-Decide-Reason-Act) for enhanced problem-solving. This is where you perform ALL detailed analysis, planning (including multi-step strategies), reflection, synthesis, and confidence assessment. Structure your thought clearly using headings. For simpler follow-up steps, consider using `quick_think` instead.", {
300
- thought: z.string().describe("Your **detailed** internal monologue covering Analysis/Observation, Plan/Decision, Verification, Risk & Contingency, and Learning & Adaptation. Use clear headings. OODReAct-style headers are recommended.")
301
- }, async ({ thought }) => {
302
- // Redirect to the original tool's logic
303
- const toolName = 'think';
304
- logToolCall(`${TOOL_PREFIX}${toolName} → ${toolName}`);
305
- try {
306
- // Basic Zod validation ensures it's a non-empty string. Content validation removed.
307
- if (thought.trim().length === 0) {
308
- throw new Error('Invalid thought: Must be a non-empty string containing substantive reasoning.');
309
- }
310
- logToolResult(toolName, true, `Thought logged (length: ${thought.length})`);
311
- // Log full input for traceability
312
- console.error(`[${new Date().toISOString()}] [MCP Server] - ${toolName} Input:\n${thought}`);
313
- // Returns the same thought text received, formatted as Markdown.
314
- return {
315
- content: [{
316
- type: "text",
317
- text: "```markdown\n" + thought + "\n```"
318
- }]
319
- };
320
- }
321
- catch (error) {
322
- // Use logToolError to format the error for the LLM
323
- return logToolError(toolName, error);
324
- }
325
- });
326
- // assess_cuc_n_mode
327
- server.tool(`${TOOL_PREFIX}assess_cuc_n_mode`, "**Mandatory Pre-Deliberation Assessment.** Evaluates task Complexity, Uncertainty, Consequence, Novelty (CUC-N) to determine required cognitive depth and initial strategy. MUST be called before starting complex tasks or changing strategy. Based on assessment, use either `think` (for structured analysis) or `quick_think` (for streamlined processing) in the next step.", {
328
- assessment_and_choice: z.string().describe("Your structured assessment including: 1) Situation Description, 2) CUC-N Ratings (Low/Medium/High for each), 3) Rationale for ratings, 4) Recommended Initial Cognitive Strategy (e.g., 'Start with chain_of_thought then think'), 5) Explicit Mode Selection ('Selected Mode: think' or 'Selected Mode: quick_think').")
329
- }, async ({ assessment_and_choice }) => {
330
- // Redirect to the original tool logic
331
- const toolName = 'assess_cuc_n_mode';
332
- logToolCall(`${TOOL_PREFIX}${toolName} → ${toolName}`);
333
- try {
334
- // Basic Zod validation ensures it's a string. Content validation removed.
335
- const modeRegex = /Selected Mode: (think|quick_think)/i;
336
- const modeMatch = assessment_and_choice.match(modeRegex);
337
- const selectedMode = modeMatch ? modeMatch[1].toLowerCase() : "unknown"; // Extract mode for logging
338
- logToolResult(toolName, true, `Selected mode (extracted): ${selectedMode}`);
339
- // Log full input for traceability
340
- console.error(`[${new Date().toISOString()}] [MCP Server] - ${toolName} Input:\n${assessment_and_choice}`);
341
- // Return the full assessment text formatted as Markdown
342
- return {
343
- content: [{
344
- type: "text",
345
- text: "```markdown\n" + assessment_and_choice + "\n```"
346
- }]
347
- };
348
- }
349
- catch (error) {
350
- return logToolError(toolName, error);
351
- }
352
- });
353
- // quick_think
354
- server.tool(`${TOOL_PREFIX}quick_think`, "Cognitive Checkpoint for streamlined processing and simple confirmations where detailed analysis via `think` is unnecessary. Use when full structured deliberation would be excessive for the current step.", {
355
- brief_thought: z.string().describe("Your **concise** thought or confirmation for this step. Briefly state the observation/action and explain why detailed analysis isn't needed.")
356
- }, async ({ brief_thought }) => {
357
- const toolName = 'quick_think';
358
- logToolCall(`${TOOL_PREFIX}${toolName} → ${toolName}`);
359
- try {
360
- // Basic Zod validation ensures it's a non-empty string. Content validation removed.
361
- if (brief_thought.trim().length === 0) {
362
- throw new Error('Invalid brief_thought: Must be a non-empty string.');
363
- }
364
- logToolResult(toolName, true, `Logged: ${brief_thought.substring(0, 80)}...`);
365
- // Log full input for traceability
366
- console.error(`[${new Date().toISOString()}] [MCP Server] - ${toolName} Input:\n${brief_thought}`);
367
- // Return the brief thought text, formatted as Markdown
368
- return {
369
- content: [{
370
- type: "text",
371
- text: "```markdown\n" + brief_thought + "\n```"
372
- }]
373
- };
374
- }
375
- catch (error) {
376
- return logToolError(toolName, error);
377
- }
378
- });
379
- // chain_of_thought
380
- server.tool(`${TOOL_PREFIX}chain_of_thought`, "Guides *internal generation* and logging of **detailed, step-by-step reasoning draft (CoT)**. Call this tool *with* the generated CoT text you created internally. Returns the CoT text formatted as Markdown. Follow with either `think` (for complex reasoning chains requiring detailed analysis) or `quick_think` (for straightforward reasoning steps) to process the CoT and plan next actions.", {
381
- generated_cot_text: z.string().describe("The **full, step-by-step Chain of Thought draft** you generated internally to solve or analyze the problem."),
382
- problem_statement: z.string().describe("The original problem statement or question this CoT addresses.")
383
- }, async ({ generated_cot_text, problem_statement }) => {
384
- const toolName = 'chain_of_thought';
385
- logToolCall(`${TOOL_PREFIX}${toolName} → ${toolName}`);
386
- try {
387
- // Basic Zod validation ensures non-empty strings. Content validation removed.
388
- if (generated_cot_text.trim().length === 0) {
389
- throw new Error('Invalid generated_cot_text: Must be a non-empty string containing the CoT.');
390
- }
391
- if (problem_statement.trim().length === 0) {
392
- throw new Error('Invalid problem_statement: Must provide the original problem.');
393
- }
394
- logToolResult(toolName, true, `Problem: ${problem_statement.substring(0, 50)}...`);
395
- // Log full input for traceability
396
- console.error(`[${new Date().toISOString()}] [MCP Server] - ${toolName} Input:\nProblem: ${problem_statement}\nReasoning:\n${generated_cot_text}`);
397
- // Return the CoT text, formatted as Markdown
398
- return {
399
- content: [{
400
- type: "text",
401
- text: "```markdown\n" + generated_cot_text + "\n```"
402
- }]
403
- };
404
- }
405
- catch (error) {
406
- return logToolError(toolName, error);
407
- }
408
- });
409
- // chain_of_draft
410
- server.tool(`${TOOL_PREFIX}chain_of_draft`, "Signals that one or more **internal drafts** have been generated/refined using **Chain of Draft (CoD)** principles. CoD aims for **maximum efficiency** by mimicking human note-taking, focusing on minimal token usage while preserving reasoning quality. Use this *instead of* detailed Chain of Thought when speed and token economy are important, or when the reasoning involves calculations or symbolic manipulation.\n\n**How to Construct SOTA CoD Internally:**\n1. **Extreme Conciseness:** Each reasoning step or draft element should be extremely brief (e.g., often just 1-5 words, like a quick note). AVOID full sentences.\n2. **Symbols & Equations:** Prioritize mathematical notation (e.g., `x = 5*y`, `area = l*w`), code snippets (e.g., `user.id`, `config['key']`), or recognized symbols over descriptive text.\n3. **Essential Information Only:** Capture only the absolute minimum information needed to proceed. Omit explanations, justifications, or restatements of the problem unless strictly necessary for the next step.\n4. **Structure:** Can be a sequence of short phrases, key values, equations, or code elements, often line-by-line. Think 'scratchpad' not 'essay'.\n5. **Contrast with CoT:** Unlike CoT's verbose explanations, CoD focuses purely on the *result* or *key element* of each reasoning step.\n6. **Final Answer (Optional but Recommended):** If the CoD sequence leads directly to a final answer, clearly mark it at the end, often using `#### Final Answer: [answer]`.\n\nCall this tool *after* generating/refining draft(s) internally following these guidelines. Provide a brief description of the draft's purpose. Returns the description formatted as Markdown. Follow with either `think` (for complex drafts requiring detailed analysis) or `quick_think` (for straightforward drafts) to evaluate and plan next steps.", {
411
- draft_description: z.string().describe("Brief but specific description of the CoD draft(s) generated/refined internally (e.g., 'Calculated intermediate values x, y', 'API call structure draft', 'Error handling logic sketch', 'Key parameters extracted').")
412
- }, async ({ draft_description }) => {
413
- const toolName = 'chain_of_draft';
414
- logToolCall(`${TOOL_PREFIX}${toolName} → ${toolName}`);
415
- try {
416
- // Basic Zod validation ensures non-empty string. Content validation removed.
417
- if (draft_description.trim().length === 0) {
418
- throw new Error('Invalid draft_description: Must provide a description.');
419
- }
420
- logToolResult(toolName, true);
421
- // Log full input for traceability
422
- console.error(`[${new Date().toISOString()}] [MCP Server] - ${toolName} Input:\nDescription: ${draft_description}`);
423
- // Return the draft description, formatted as Markdown
424
- return {
425
- content: [{
426
- type: "text",
427
- text: "```markdown\n" + draft_description + "\n```"
428
- }]
429
- };
430
- }
431
- catch (error) {
432
- return logToolError(toolName, error);
433
- }
434
- });
435
- console.error(`[MCP Server] Registered compatibility aliases for prefixed tool names`);
436
283
  const border = '-----------------------------------------------------';
437
284
  console.error(border);
438
285
  console.error(` ${serverInfo.description}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbiish/cognitive-tools-mcp",
3
- "version": "0.9.21",
3
+ "version": "0.9.23",
4
4
  "description": "Cognitive Tools MCP: SOTA reasoning suite focused on iterative refinement and tool integration for AI Pair Programming. Enables structured, iterative problem-solving through Chain of Draft methodology, with tools for draft generation, analysis, and refinement. Features advanced deliberation (`think`), rapid checks (`quick_think`), mandatory complexity assessment & thought mode selection (`assess_cuc_n_mode`), context synthesis, confidence gauging, proactive planning, explicit reasoning (CoT), and reflection with content return. Alternative package name for gikendaasowin-aabajichiganan-mcp.",
5
5
  "private": false,
6
6
  "type": "module",