@chapterai/mcp 0.1.2 → 0.1.4
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/dist/index.js +10 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22749,20 +22749,24 @@ function registerFileTools(server2) {
|
|
|
22749
22749
|
);
|
|
22750
22750
|
server2.tool(
|
|
22751
22751
|
"read_file",
|
|
22752
|
-
"Read the content of a file in a workspace",
|
|
22752
|
+
"Read the content of a file in a workspace. Use offset/limit to read a slice of a large file instead of the whole thing.",
|
|
22753
22753
|
{
|
|
22754
22754
|
workspaceId: external_exports.string().uuid().optional().describe("Project ID (auto-resolved from workspace link if omitted)"),
|
|
22755
22755
|
workspaceName: external_exports.string().optional().describe("Project name (alternative to workspaceId)"),
|
|
22756
22756
|
path: external_exports.string().describe("File path to read"),
|
|
22757
|
-
ref: external_exports.string().optional().describe("Git ref (branch, tag, or commit SHA)")
|
|
22757
|
+
ref: external_exports.string().optional().describe("Git ref (branch, tag, or commit SHA)"),
|
|
22758
|
+
offset: external_exports.number().int().min(1).optional().describe("1-indexed line number to start reading from (omit to read from line 1)"),
|
|
22759
|
+
limit: external_exports.number().int().min(1).optional().describe("Maximum number of lines to return (omit to read to end of file)")
|
|
22758
22760
|
},
|
|
22759
|
-
async ({ workspaceId, workspaceName, path: path3, ref }) => {
|
|
22761
|
+
async ({ workspaceId, workspaceName, path: path3, ref, offset, limit }) => {
|
|
22760
22762
|
try {
|
|
22761
22763
|
const id = await resolveWorkspaceId(workspaceId, workspaceName);
|
|
22762
22764
|
const result = await api.workspaces.readFile({
|
|
22763
22765
|
workspaceId: id,
|
|
22764
22766
|
path: path3,
|
|
22765
|
-
ref
|
|
22767
|
+
ref,
|
|
22768
|
+
offset,
|
|
22769
|
+
limit
|
|
22766
22770
|
});
|
|
22767
22771
|
return success(result.content);
|
|
22768
22772
|
} catch (error2) {
|
|
@@ -23712,11 +23716,11 @@ ${lines.join("\n")}`);
|
|
|
23712
23716
|
);
|
|
23713
23717
|
server2.tool(
|
|
23714
23718
|
"get_codebase_context",
|
|
23715
|
-
"
|
|
23719
|
+
"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.",
|
|
23716
23720
|
{
|
|
23717
23721
|
workspaceId: external_exports.string().uuid().optional().describe("Workspace ID"),
|
|
23718
23722
|
workspaceName: external_exports.string().optional().describe("Workspace name (alternative to ID)"),
|
|
23719
|
-
taskDescription: external_exports.string().describe('
|
|
23723
|
+
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"')
|
|
23720
23724
|
},
|
|
23721
23725
|
async ({ workspaceId, workspaceName, taskDescription }) => {
|
|
23722
23726
|
try {
|