Skip to main content
Glama

knapsack_solve

Read-onlyIdempotent

Solves the 0-1 knapsack problem by selecting items that maximize total value without exceeding a specified weight capacity.

Instructions

Solve the 0-1 knapsack problem: pick items to maximize value within a weight capacity.

Input Schema

NameRequiredDescriptionDefault
itemsYesArray of { name?, weight, value } objects.
capacityYesMaximum weight capacity (integer units, max 100000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

Score is being calculated.

Deploy Server

Other Tools