fix: state material privacy on the pin tools

bm_pin_material and bm_unpin_material bind /materials paths, so their
descriptions carry MCPMaterialPrivacy like the other material tools.
This commit is contained in:
Jakub Zych
2026-11-09 14:48:14 +01:00
parent a4b564b2f8
commit 9a5a28ab2f

View File

@@ -199,7 +199,7 @@ func studentTools() []pact.MCPTool {
{
Name: "pin_material",
Title: "Pin a material",
Description: "Pins a material the signed-in student may see, for this student only (nobody else sees the pin): bm_materials without q then lists it first, newest pin first, and the material answers carry pinned true. Pinning again keeps the first pin time. Answers with no content; a material the student cannot see is not found." + needsScopeWrite,
Description: "Pins a material the signed-in student may see, for this student only (nobody else sees the pin): bm_materials without q then lists it first, newest pin first, and the material answers carry pinned true. Pinning again keeps the first pin time. Answers with no content; a material the student cannot see is not found. " + MCPMaterialPrivacy + needsScopeWrite,
Guard: "user",
Method: http.MethodPut,
Path: TokenPrefix + "/materials/{id}/pin",
@@ -208,7 +208,7 @@ func studentTools() []pact.MCPTool {
{
Name: "unpin_material",
Title: "Unpin a material",
Description: "Removes the signed-in student's own pin from a material (it can be pinned again); unpinning a material that is not pinned is not an error. Answers with no content." + needsScopeWrite,
Description: "Removes the signed-in student's own pin from a material (it can be pinned again); unpinning a material that is not pinned is not an error. Answers with no content. " + MCPMaterialPrivacy + needsScopeWrite,
Guard: "user",
Method: http.MethodDelete,
Path: TokenPrefix + "/materials/{id}/pin",