c64-debug-mcp 1.0.9 → 1.0.10

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/http.cjs CHANGED
@@ -3646,30 +3646,33 @@ var readMemoryTool = createViceTool({
3646
3646
  start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3647
3647
  end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)")
3648
3648
  })
3649
- ]).transform((input) => {
3650
- if ("start" in input && "end" in input) {
3651
- if (input.end < input.start) {
3652
- throw new Error("End address must be greater than or equal to start address");
3653
- }
3654
- return {
3655
- address: input.start,
3656
- length: input.end - input.start + 1
3657
- };
3658
- }
3659
- return input;
3660
- }).refine((input) => input.address + input.length <= 65536, {
3661
- message: "address + length must stay within the 64K address space",
3662
- path: ["length"]
3663
- }),
3649
+ ]),
3664
3650
  dataSchema: import_zod4.z.object({
3665
3651
  address: address16Schema.describe("Start address of the returned memory chunk"),
3666
3652
  length: import_zod4.z.number().int().min(0).describe("Number of bytes returned"),
3667
3653
  data: byteArraySchema.describe("Raw bytes returned from memory")
3668
3654
  }),
3669
3655
  execute: async (input) => {
3670
- const result = await c64Session.readMemory(input.address, input.address + input.length - 1);
3656
+ let address;
3657
+ let length;
3658
+ if ("start" in input && "end" in input) {
3659
+ if (input.end < input.start) {
3660
+ throw new Error("End address must be greater than or equal to start address");
3661
+ }
3662
+ address = input.start;
3663
+ length = input.end - input.start + 1;
3664
+ } else if ("address" in input && "length" in input) {
3665
+ address = input.address;
3666
+ length = input.length;
3667
+ } else {
3668
+ throw new Error("Invalid input: must provide either (address, length) or (start, end)");
3669
+ }
3670
+ if (address + length > 65536) {
3671
+ throw new Error("address + length must stay within the 64K address space");
3672
+ }
3673
+ const result = await c64Session.readMemory(address, address + length - 1);
3671
3674
  return {
3672
- address: input.address,
3675
+ address,
3673
3676
  length: result.length,
3674
3677
  data: result.data
3675
3678
  };
@@ -3737,36 +3740,26 @@ var listBreakpointsTool = createViceTool({
3737
3740
  var breakpointSetTool = createViceTool({
3738
3741
  id: "breakpoint_set",
3739
3742
  description: "Creates an execution breakpoint or read/write watchpoint. Use either (address, length) or (start, end) format. Addresses can be decimal (53248) or hex string with prefix ($D000, 0xD000).",
3740
- inputSchema: import_zod4.z.object({
3741
- kind: breakpointKindSchema,
3742
- condition: import_zod4.z.string().optional(),
3743
- label: import_zod4.z.string().optional(),
3744
- temporary: import_zod4.z.boolean().default(false),
3745
- enabled: import_zod4.z.boolean().default(true)
3746
- }).and(
3747
- import_zod4.z.union([
3748
- import_zod4.z.object({
3749
- address: address16Schema.describe("Start address: decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3750
- length: import_zod4.z.number().int().positive().default(1).describe("Size of the breakpoint range in bytes")
3751
- }),
3752
- import_zod4.z.object({
3753
- start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3754
- end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)")
3755
- })
3756
- ])
3757
- ).transform((input) => {
3758
- if ("start" in input && "end" in input) {
3759
- if (input.end < input.start) {
3760
- throw new Error("End address must be greater than or equal to start address");
3761
- }
3762
- return {
3763
- ...input,
3764
- address: input.start,
3765
- length: input.end - input.start + 1
3766
- };
3767
- }
3768
- return input;
3769
- }),
3743
+ inputSchema: import_zod4.z.union([
3744
+ import_zod4.z.object({
3745
+ kind: breakpointKindSchema,
3746
+ address: address16Schema.describe("Start address: decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3747
+ length: import_zod4.z.number().int().positive().default(1).describe("Size of the breakpoint range in bytes"),
3748
+ condition: import_zod4.z.string().optional(),
3749
+ label: import_zod4.z.string().optional(),
3750
+ temporary: import_zod4.z.boolean().default(false),
3751
+ enabled: import_zod4.z.boolean().default(true)
3752
+ }),
3753
+ import_zod4.z.object({
3754
+ kind: breakpointKindSchema,
3755
+ start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3756
+ end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3757
+ condition: import_zod4.z.string().optional(),
3758
+ label: import_zod4.z.string().optional(),
3759
+ temporary: import_zod4.z.boolean().default(false),
3760
+ enabled: import_zod4.z.boolean().default(true)
3761
+ })
3762
+ ]),
3770
3763
  dataSchema: import_zod4.z.object({
3771
3764
  breakpoint: breakpointSchema,
3772
3765
  executionState: executionStateSchema,
@@ -3775,7 +3768,34 @@ var breakpointSetTool = createViceTool({
3775
3768
  registers: c64PartialRegisterValueSchema.nullable()
3776
3769
  }),
3777
3770
  execute: async (input) => {
3778
- const result = await c64Session.breakpointSet(input);
3771
+ let normalizedInput;
3772
+ if ("start" in input && "end" in input) {
3773
+ if (input.end < input.start) {
3774
+ throw new Error("End address must be greater than or equal to start address");
3775
+ }
3776
+ normalizedInput = {
3777
+ kind: input.kind,
3778
+ address: input.start,
3779
+ length: input.end - input.start + 1,
3780
+ condition: input.condition,
3781
+ label: input.label,
3782
+ temporary: input.temporary,
3783
+ enabled: input.enabled
3784
+ };
3785
+ } else if ("address" in input && "length" in input) {
3786
+ normalizedInput = {
3787
+ kind: input.kind,
3788
+ address: input.address,
3789
+ length: input.length,
3790
+ condition: input.condition,
3791
+ label: input.label,
3792
+ temporary: input.temporary,
3793
+ enabled: input.enabled
3794
+ };
3795
+ } else {
3796
+ throw new Error("Invalid input: must provide either (address, length) or (start, end)");
3797
+ }
3798
+ const result = await c64Session.breakpointSet(normalizedInput);
3779
3799
  return {
3780
3800
  breakpoint: normalizeBreakpoint(result.breakpoint),
3781
3801
  executionState: result.executionState,
package/dist/http.js CHANGED
@@ -3623,30 +3623,33 @@ var readMemoryTool = createViceTool({
3623
3623
  start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3624
3624
  end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)")
3625
3625
  })
3626
- ]).transform((input) => {
3627
- if ("start" in input && "end" in input) {
3628
- if (input.end < input.start) {
3629
- throw new Error("End address must be greater than or equal to start address");
3630
- }
3631
- return {
3632
- address: input.start,
3633
- length: input.end - input.start + 1
3634
- };
3635
- }
3636
- return input;
3637
- }).refine((input) => input.address + input.length <= 65536, {
3638
- message: "address + length must stay within the 64K address space",
3639
- path: ["length"]
3640
- }),
3626
+ ]),
3641
3627
  dataSchema: z3.object({
3642
3628
  address: address16Schema.describe("Start address of the returned memory chunk"),
3643
3629
  length: z3.number().int().min(0).describe("Number of bytes returned"),
3644
3630
  data: byteArraySchema.describe("Raw bytes returned from memory")
3645
3631
  }),
3646
3632
  execute: async (input) => {
3647
- const result = await c64Session.readMemory(input.address, input.address + input.length - 1);
3633
+ let address;
3634
+ let length;
3635
+ if ("start" in input && "end" in input) {
3636
+ if (input.end < input.start) {
3637
+ throw new Error("End address must be greater than or equal to start address");
3638
+ }
3639
+ address = input.start;
3640
+ length = input.end - input.start + 1;
3641
+ } else if ("address" in input && "length" in input) {
3642
+ address = input.address;
3643
+ length = input.length;
3644
+ } else {
3645
+ throw new Error("Invalid input: must provide either (address, length) or (start, end)");
3646
+ }
3647
+ if (address + length > 65536) {
3648
+ throw new Error("address + length must stay within the 64K address space");
3649
+ }
3650
+ const result = await c64Session.readMemory(address, address + length - 1);
3648
3651
  return {
3649
- address: input.address,
3652
+ address,
3650
3653
  length: result.length,
3651
3654
  data: result.data
3652
3655
  };
@@ -3714,36 +3717,26 @@ var listBreakpointsTool = createViceTool({
3714
3717
  var breakpointSetTool = createViceTool({
3715
3718
  id: "breakpoint_set",
3716
3719
  description: "Creates an execution breakpoint or read/write watchpoint. Use either (address, length) or (start, end) format. Addresses can be decimal (53248) or hex string with prefix ($D000, 0xD000).",
3717
- inputSchema: z3.object({
3718
- kind: breakpointKindSchema,
3719
- condition: z3.string().optional(),
3720
- label: z3.string().optional(),
3721
- temporary: z3.boolean().default(false),
3722
- enabled: z3.boolean().default(true)
3723
- }).and(
3724
- z3.union([
3725
- z3.object({
3726
- address: address16Schema.describe("Start address: decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3727
- length: z3.number().int().positive().default(1).describe("Size of the breakpoint range in bytes")
3728
- }),
3729
- z3.object({
3730
- start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3731
- end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)")
3732
- })
3733
- ])
3734
- ).transform((input) => {
3735
- if ("start" in input && "end" in input) {
3736
- if (input.end < input.start) {
3737
- throw new Error("End address must be greater than or equal to start address");
3738
- }
3739
- return {
3740
- ...input,
3741
- address: input.start,
3742
- length: input.end - input.start + 1
3743
- };
3744
- }
3745
- return input;
3746
- }),
3720
+ inputSchema: z3.union([
3721
+ z3.object({
3722
+ kind: breakpointKindSchema,
3723
+ address: address16Schema.describe("Start address: decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3724
+ length: z3.number().int().positive().default(1).describe("Size of the breakpoint range in bytes"),
3725
+ condition: z3.string().optional(),
3726
+ label: z3.string().optional(),
3727
+ temporary: z3.boolean().default(false),
3728
+ enabled: z3.boolean().default(true)
3729
+ }),
3730
+ z3.object({
3731
+ kind: breakpointKindSchema,
3732
+ start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3733
+ end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3734
+ condition: z3.string().optional(),
3735
+ label: z3.string().optional(),
3736
+ temporary: z3.boolean().default(false),
3737
+ enabled: z3.boolean().default(true)
3738
+ })
3739
+ ]),
3747
3740
  dataSchema: z3.object({
3748
3741
  breakpoint: breakpointSchema,
3749
3742
  executionState: executionStateSchema,
@@ -3752,7 +3745,34 @@ var breakpointSetTool = createViceTool({
3752
3745
  registers: c64PartialRegisterValueSchema.nullable()
3753
3746
  }),
3754
3747
  execute: async (input) => {
3755
- const result = await c64Session.breakpointSet(input);
3748
+ let normalizedInput;
3749
+ if ("start" in input && "end" in input) {
3750
+ if (input.end < input.start) {
3751
+ throw new Error("End address must be greater than or equal to start address");
3752
+ }
3753
+ normalizedInput = {
3754
+ kind: input.kind,
3755
+ address: input.start,
3756
+ length: input.end - input.start + 1,
3757
+ condition: input.condition,
3758
+ label: input.label,
3759
+ temporary: input.temporary,
3760
+ enabled: input.enabled
3761
+ };
3762
+ } else if ("address" in input && "length" in input) {
3763
+ normalizedInput = {
3764
+ kind: input.kind,
3765
+ address: input.address,
3766
+ length: input.length,
3767
+ condition: input.condition,
3768
+ label: input.label,
3769
+ temporary: input.temporary,
3770
+ enabled: input.enabled
3771
+ };
3772
+ } else {
3773
+ throw new Error("Invalid input: must provide either (address, length) or (start, end)");
3774
+ }
3775
+ const result = await c64Session.breakpointSet(normalizedInput);
3756
3776
  return {
3757
3777
  breakpoint: normalizeBreakpoint(result.breakpoint),
3758
3778
  executionState: result.executionState,
package/dist/stdio.cjs CHANGED
@@ -3643,30 +3643,33 @@ var readMemoryTool = createViceTool({
3643
3643
  start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3644
3644
  end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)")
3645
3645
  })
3646
- ]).transform((input) => {
3647
- if ("start" in input && "end" in input) {
3648
- if (input.end < input.start) {
3649
- throw new Error("End address must be greater than or equal to start address");
3650
- }
3651
- return {
3652
- address: input.start,
3653
- length: input.end - input.start + 1
3654
- };
3655
- }
3656
- return input;
3657
- }).refine((input) => input.address + input.length <= 65536, {
3658
- message: "address + length must stay within the 64K address space",
3659
- path: ["length"]
3660
- }),
3646
+ ]),
3661
3647
  dataSchema: import_zod4.z.object({
3662
3648
  address: address16Schema.describe("Start address of the returned memory chunk"),
3663
3649
  length: import_zod4.z.number().int().min(0).describe("Number of bytes returned"),
3664
3650
  data: byteArraySchema.describe("Raw bytes returned from memory")
3665
3651
  }),
3666
3652
  execute: async (input) => {
3667
- const result = await c64Session.readMemory(input.address, input.address + input.length - 1);
3653
+ let address;
3654
+ let length;
3655
+ if ("start" in input && "end" in input) {
3656
+ if (input.end < input.start) {
3657
+ throw new Error("End address must be greater than or equal to start address");
3658
+ }
3659
+ address = input.start;
3660
+ length = input.end - input.start + 1;
3661
+ } else if ("address" in input && "length" in input) {
3662
+ address = input.address;
3663
+ length = input.length;
3664
+ } else {
3665
+ throw new Error("Invalid input: must provide either (address, length) or (start, end)");
3666
+ }
3667
+ if (address + length > 65536) {
3668
+ throw new Error("address + length must stay within the 64K address space");
3669
+ }
3670
+ const result = await c64Session.readMemory(address, address + length - 1);
3668
3671
  return {
3669
- address: input.address,
3672
+ address,
3670
3673
  length: result.length,
3671
3674
  data: result.data
3672
3675
  };
@@ -3734,36 +3737,26 @@ var listBreakpointsTool = createViceTool({
3734
3737
  var breakpointSetTool = createViceTool({
3735
3738
  id: "breakpoint_set",
3736
3739
  description: "Creates an execution breakpoint or read/write watchpoint. Use either (address, length) or (start, end) format. Addresses can be decimal (53248) or hex string with prefix ($D000, 0xD000).",
3737
- inputSchema: import_zod4.z.object({
3738
- kind: breakpointKindSchema,
3739
- condition: import_zod4.z.string().optional(),
3740
- label: import_zod4.z.string().optional(),
3741
- temporary: import_zod4.z.boolean().default(false),
3742
- enabled: import_zod4.z.boolean().default(true)
3743
- }).and(
3744
- import_zod4.z.union([
3745
- import_zod4.z.object({
3746
- address: address16Schema.describe("Start address: decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3747
- length: import_zod4.z.number().int().positive().default(1).describe("Size of the breakpoint range in bytes")
3748
- }),
3749
- import_zod4.z.object({
3750
- start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3751
- end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)")
3752
- })
3753
- ])
3754
- ).transform((input) => {
3755
- if ("start" in input && "end" in input) {
3756
- if (input.end < input.start) {
3757
- throw new Error("End address must be greater than or equal to start address");
3758
- }
3759
- return {
3760
- ...input,
3761
- address: input.start,
3762
- length: input.end - input.start + 1
3763
- };
3764
- }
3765
- return input;
3766
- }),
3740
+ inputSchema: import_zod4.z.union([
3741
+ import_zod4.z.object({
3742
+ kind: breakpointKindSchema,
3743
+ address: address16Schema.describe("Start address: decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3744
+ length: import_zod4.z.number().int().positive().default(1).describe("Size of the breakpoint range in bytes"),
3745
+ condition: import_zod4.z.string().optional(),
3746
+ label: import_zod4.z.string().optional(),
3747
+ temporary: import_zod4.z.boolean().default(false),
3748
+ enabled: import_zod4.z.boolean().default(true)
3749
+ }),
3750
+ import_zod4.z.object({
3751
+ kind: breakpointKindSchema,
3752
+ start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3753
+ end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3754
+ condition: import_zod4.z.string().optional(),
3755
+ label: import_zod4.z.string().optional(),
3756
+ temporary: import_zod4.z.boolean().default(false),
3757
+ enabled: import_zod4.z.boolean().default(true)
3758
+ })
3759
+ ]),
3767
3760
  dataSchema: import_zod4.z.object({
3768
3761
  breakpoint: breakpointSchema,
3769
3762
  executionState: executionStateSchema,
@@ -3772,7 +3765,34 @@ var breakpointSetTool = createViceTool({
3772
3765
  registers: c64PartialRegisterValueSchema.nullable()
3773
3766
  }),
3774
3767
  execute: async (input) => {
3775
- const result = await c64Session.breakpointSet(input);
3768
+ let normalizedInput;
3769
+ if ("start" in input && "end" in input) {
3770
+ if (input.end < input.start) {
3771
+ throw new Error("End address must be greater than or equal to start address");
3772
+ }
3773
+ normalizedInput = {
3774
+ kind: input.kind,
3775
+ address: input.start,
3776
+ length: input.end - input.start + 1,
3777
+ condition: input.condition,
3778
+ label: input.label,
3779
+ temporary: input.temporary,
3780
+ enabled: input.enabled
3781
+ };
3782
+ } else if ("address" in input && "length" in input) {
3783
+ normalizedInput = {
3784
+ kind: input.kind,
3785
+ address: input.address,
3786
+ length: input.length,
3787
+ condition: input.condition,
3788
+ label: input.label,
3789
+ temporary: input.temporary,
3790
+ enabled: input.enabled
3791
+ };
3792
+ } else {
3793
+ throw new Error("Invalid input: must provide either (address, length) or (start, end)");
3794
+ }
3795
+ const result = await c64Session.breakpointSet(normalizedInput);
3776
3796
  return {
3777
3797
  breakpoint: normalizeBreakpoint(result.breakpoint),
3778
3798
  executionState: result.executionState,
package/dist/stdio.js CHANGED
@@ -3620,30 +3620,33 @@ var readMemoryTool = createViceTool({
3620
3620
  start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3621
3621
  end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)")
3622
3622
  })
3623
- ]).transform((input) => {
3624
- if ("start" in input && "end" in input) {
3625
- if (input.end < input.start) {
3626
- throw new Error("End address must be greater than or equal to start address");
3627
- }
3628
- return {
3629
- address: input.start,
3630
- length: input.end - input.start + 1
3631
- };
3632
- }
3633
- return input;
3634
- }).refine((input) => input.address + input.length <= 65536, {
3635
- message: "address + length must stay within the 64K address space",
3636
- path: ["length"]
3637
- }),
3623
+ ]),
3638
3624
  dataSchema: z3.object({
3639
3625
  address: address16Schema.describe("Start address of the returned memory chunk"),
3640
3626
  length: z3.number().int().min(0).describe("Number of bytes returned"),
3641
3627
  data: byteArraySchema.describe("Raw bytes returned from memory")
3642
3628
  }),
3643
3629
  execute: async (input) => {
3644
- const result = await c64Session.readMemory(input.address, input.address + input.length - 1);
3630
+ let address;
3631
+ let length;
3632
+ if ("start" in input && "end" in input) {
3633
+ if (input.end < input.start) {
3634
+ throw new Error("End address must be greater than or equal to start address");
3635
+ }
3636
+ address = input.start;
3637
+ length = input.end - input.start + 1;
3638
+ } else if ("address" in input && "length" in input) {
3639
+ address = input.address;
3640
+ length = input.length;
3641
+ } else {
3642
+ throw new Error("Invalid input: must provide either (address, length) or (start, end)");
3643
+ }
3644
+ if (address + length > 65536) {
3645
+ throw new Error("address + length must stay within the 64K address space");
3646
+ }
3647
+ const result = await c64Session.readMemory(address, address + length - 1);
3645
3648
  return {
3646
- address: input.address,
3649
+ address,
3647
3650
  length: result.length,
3648
3651
  data: result.data
3649
3652
  };
@@ -3711,36 +3714,26 @@ var listBreakpointsTool = createViceTool({
3711
3714
  var breakpointSetTool = createViceTool({
3712
3715
  id: "breakpoint_set",
3713
3716
  description: "Creates an execution breakpoint or read/write watchpoint. Use either (address, length) or (start, end) format. Addresses can be decimal (53248) or hex string with prefix ($D000, 0xD000).",
3714
- inputSchema: z3.object({
3715
- kind: breakpointKindSchema,
3716
- condition: z3.string().optional(),
3717
- label: z3.string().optional(),
3718
- temporary: z3.boolean().default(false),
3719
- enabled: z3.boolean().default(true)
3720
- }).and(
3721
- z3.union([
3722
- z3.object({
3723
- address: address16Schema.describe("Start address: decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3724
- length: z3.number().int().positive().default(1).describe("Size of the breakpoint range in bytes")
3725
- }),
3726
- z3.object({
3727
- start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3728
- end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)")
3729
- })
3730
- ])
3731
- ).transform((input) => {
3732
- if ("start" in input && "end" in input) {
3733
- if (input.end < input.start) {
3734
- throw new Error("End address must be greater than or equal to start address");
3735
- }
3736
- return {
3737
- ...input,
3738
- address: input.start,
3739
- length: input.end - input.start + 1
3740
- };
3741
- }
3742
- return input;
3743
- }),
3717
+ inputSchema: z3.union([
3718
+ z3.object({
3719
+ kind: breakpointKindSchema,
3720
+ address: address16Schema.describe("Start address: decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3721
+ length: z3.number().int().positive().default(1).describe("Size of the breakpoint range in bytes"),
3722
+ condition: z3.string().optional(),
3723
+ label: z3.string().optional(),
3724
+ temporary: z3.boolean().default(false),
3725
+ enabled: z3.boolean().default(true)
3726
+ }),
3727
+ z3.object({
3728
+ kind: breakpointKindSchema,
3729
+ start: address16Schema.describe("Start address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3730
+ end: address16Schema.describe("End address (inclusive): decimal (53248) or hex string with prefix ($D000, 0xD000)"),
3731
+ condition: z3.string().optional(),
3732
+ label: z3.string().optional(),
3733
+ temporary: z3.boolean().default(false),
3734
+ enabled: z3.boolean().default(true)
3735
+ })
3736
+ ]),
3744
3737
  dataSchema: z3.object({
3745
3738
  breakpoint: breakpointSchema,
3746
3739
  executionState: executionStateSchema,
@@ -3749,7 +3742,34 @@ var breakpointSetTool = createViceTool({
3749
3742
  registers: c64PartialRegisterValueSchema.nullable()
3750
3743
  }),
3751
3744
  execute: async (input) => {
3752
- const result = await c64Session.breakpointSet(input);
3745
+ let normalizedInput;
3746
+ if ("start" in input && "end" in input) {
3747
+ if (input.end < input.start) {
3748
+ throw new Error("End address must be greater than or equal to start address");
3749
+ }
3750
+ normalizedInput = {
3751
+ kind: input.kind,
3752
+ address: input.start,
3753
+ length: input.end - input.start + 1,
3754
+ condition: input.condition,
3755
+ label: input.label,
3756
+ temporary: input.temporary,
3757
+ enabled: input.enabled
3758
+ };
3759
+ } else if ("address" in input && "length" in input) {
3760
+ normalizedInput = {
3761
+ kind: input.kind,
3762
+ address: input.address,
3763
+ length: input.length,
3764
+ condition: input.condition,
3765
+ label: input.label,
3766
+ temporary: input.temporary,
3767
+ enabled: input.enabled
3768
+ };
3769
+ } else {
3770
+ throw new Error("Invalid input: must provide either (address, length) or (start, end)");
3771
+ }
3772
+ const result = await c64Session.breakpointSet(normalizedInput);
3753
3773
  return {
3754
3774
  breakpoint: normalizeBreakpoint(result.breakpoint),
3755
3775
  executionState: result.executionState,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c64-debug-mcp",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Model Context Protocol server for C64 debugging via VICE emulator",
5
5
  "type": "module",
6
6
  "keywords": [