♻️ Extract json mime

issue #64
This commit is contained in:
OpenWaygate committed 2025-08-03 20:51:06 +08:00
1 parent 9e848518c9
commit 67e85e19ae
3 files changed
+5 -4

No files matched your search

+1
View File
@@ -6,4 +6,5 @@ const (
TableUsage = "json, yaml, or table"
SilentUsage = "json, yaml, or silent"
JPUsage = "JSONPath expression to filter the output"
JsonMIME = "application/json"
)
+2 -2
View File
@@ -84,7 +84,7 @@ func listHandler(
var allI18nLanguages = mcp.NewResource(
rURI, rName,
mcp.WithMIMEType("application/json"),
mcp.WithMIMEType(cmd.JsonMIME),
mcp.WithResourceDescription(long),
)
@@ -102,7 +102,7 @@ func resourceHandler(
contents := []mcp.ResourceContents{
mcp.TextResourceContents{
URI: rURI,
MIMEType: "application/json",
MIMEType: cmd.JsonMIME,
Text: writer.String(),
},
}
+2 -2
View File
@@ -84,7 +84,7 @@ func listHandler(
var alli18nRegion = mcp.NewResource(
rURI, rName,
mcp.WithMIMEType("application/json"),
mcp.WithMIMEType(cmd.JsonMIME),
mcp.WithResourceDescription(long),
)
@@ -102,7 +102,7 @@ func resourceHandler(
contents := []mcp.ResourceContents{
mcp.TextResourceContents{
URI: rURI,
MIMEType: "application/json",
MIMEType: cmd.JsonMIME,
Text: writer.String(),
},
}