@chapterai/mcp 0.1.5 → 0.1.7

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 (2) hide show
  1. package/dist/index.js +24 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23735,15 +23735,37 @@ ${lines.join("\n")}`);
23735
23735
  }
23736
23736
  }
23737
23737
  );
23738
+ server2.tool(
23739
+ "answer_about_codebase",
23740
+ 'Ask a question about the codebase and get a complete, cited answer in one call. Reads the most relevant ~8 files server-side and returns a synthesized markdown answer with inline path:line citations on every concrete claim. ASK FIRST for any "how does X work", "where is X created/used across the codebase", or "walk me through the flow from A to B" question \u2014 this replaces the typical query_codebase + 4-6 read_file slices loop with a single round trip. Only fall back to read_file when you need verbatim code beyond what the answer cites.',
23741
+ {
23742
+ workspaceId: external_exports.string().uuid().optional().describe("Workspace ID"),
23743
+ workspaceName: external_exports.string().optional().describe("Workspace name (alternative to ID)"),
23744
+ taskDescription: external_exports.string().describe('Question or task \u2014 e.g. "how does the permission system work?", "where is sessionEnded emitted across the codebase?", "walk me through what happens when a user clicks Apply Changes"')
23745
+ },
23746
+ async ({ workspaceId, workspaceName, taskDescription }) => {
23747
+ try {
23748
+ const id = await resolveWorkspaceId(workspaceId, workspaceName);
23749
+ const result = await api.intelligence.contextForTask({
23750
+ workspaceId: id,
23751
+ taskDescription
23752
+ });
23753
+ return success(result.context);
23754
+ } catch (error2) {
23755
+ return formatError2(error2);
23756
+ }
23757
+ }
23758
+ );
23738
23759
  server2.tool(
23739
23760
  "get_codebase_context",
23740
- "Ask a question about the codebase or describe a task \u2014 returns an AI-synthesized answer with specific file paths, function names, and implementation details. The answer is ready to use: start working immediately based on it. Only read files if you need to see exact code not covered in the answer.",
23761
+ "(deprecated alias for answer_about_codebase) Ask a question about the codebase and get a cited answer. This name will be removed in 0.3.0; switch your callsites to answer_about_codebase.",
23741
23762
  {
23742
23763
  workspaceId: external_exports.string().uuid().optional().describe("Workspace ID"),
23743
23764
  workspaceName: external_exports.string().optional().describe("Workspace name (alternative to ID)"),
23744
- taskDescription: external_exports.string().describe('Question or task description \u2014 e.g. "how does the permission system work?" or "change the welcome message on the home page"')
23765
+ taskDescription: external_exports.string().describe("Question or task description")
23745
23766
  },
23746
23767
  async ({ workspaceId, workspaceName, taskDescription }) => {
23768
+ console.error("get_codebase_context is deprecated; use answer_about_codebase");
23747
23769
  try {
23748
23770
  const id = await resolveWorkspaceId(workspaceId, workspaceName);
23749
23771
  const result = await api.intelligence.contextForTask({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chapterai/mcp",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "Chapter MCP server — gives AI agents access to Chapter projects, files, changes, and history",
5
5
  "type": "module",
6
6
  "bin": {