feat: public API, SEO and existing surfaces
This commit is contained in:
1 parent
45fbbc33b1
commit
c390fcfe8d
103 files changed
+4476
-231
No files matched your search
@@ -92,6 +92,7 @@ func TestMCPToolsMapToTheAPIWithTheKey(t *testing.T) {
|
||||
body string
|
||||
}{
|
||||
{"list_articles", map[string]any{"page": 2, "size": 5, "status": "draft", "q": "tile"}, "GET", "/v1/article/?page=2&q=tile&size=5&status=draft", ""},
|
||||
{"list_articles", map[string]any{"lang": "pt-BR"}, "GET", "/v1/article/?lang=pt-BR", ""},
|
||||
{"get_article", map[string]any{"id": 7, "format": "html"}, "GET", "/v1/article/7?format=html", ""},
|
||||
{"create_article", map[string]any{"title": "Grout tips", "body": "<p>x</p>"}, "POST", "/v1/article/", `{"body":"<p>x</p>","title":"Grout tips"}`},
|
||||
{"update_article_body", map[string]any{"id": 7, "body": "<p>y</p>"}, "PATCH", "/v1/article/7", `{"body":"<p>y</p>"}`},
|
||||
@@ -187,3 +188,17 @@ func sameJSONBody(got string, want string) bool {
|
||||
}
|
||||
return reflect.DeepEqual(a, b)
|
||||
}
|
||||
|
||||
func TestMCPToolsNoLongerSayATitleCannotChange(t *testing.T) {
|
||||
f := newMCPFixture(t, false, echoStatus(200, `{"ok":true}`))
|
||||
|
||||
tools, err := f.session.ListTools(context.Background(), nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
schemas, _ := json.Marshal(tools.Tools)
|
||||
if strings.Contains(string(schemas), "cannot be changed") {
|
||||
t.Errorf("a tool still says that a title cannot be changed")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user