You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
responseBuilder.Append(CultureInfo.InvariantCulture,$"## Response\n\nNo results found for: \"{query}\"\n\nIf you'd like to retry the search, try changing the query to increase the likelihood of a match.");
36
+
returnresponseBuilder.ToString();
37
+
}
38
+
39
+
responseBuilder.Append(CultureInfo.InvariantCulture,$"## Response\n\nResults found for: \"{query}\". Listing a document id and document title:\n\n");
[Description("Semantically search within the Duende documentation for the given query.")]
21
+
publicasyncTask<string>Search(
22
+
[Description("The search query. Keep it concise and specific to increase the likelihood of a match.")]stringquery)
23
+
{
24
+
varresults=awaitdb.FTSDocsArticle
25
+
.FromSqlRaw("SELECT * FROM FTSDocsArticle WHERE Title MATCH {0} OR Content MATCH {0} OR Product MATCH {0} ORDER BY rank",McpDb.EscapeFtsQueryString(query))
responseBuilder.Append(CultureInfo.InvariantCulture,$"## Response\n\nNo results found for: \"{query}\"\n\nIf you'd like to retry the search, try changing the query to increase the likelihood of a match.");
36
+
returnresponseBuilder.ToString();
37
+
}
38
+
39
+
responseBuilder.Append(CultureInfo.InvariantCulture,$"## Response\n\nResults found for: \"{query}\". Listing a document id and document title, followed by related product:\n\n");
[Description("Search within the Duende code samples for the given query. Use this tool to find recent and relevant C# code samples.")]
21
+
publicasyncTask<string>Search(
22
+
[Description("The search query. Keep it concise and specific to increase the likelihood of a match.")]stringquery)
23
+
{
24
+
varresults=awaitdb.FTSSampleProject
25
+
.FromSqlRaw("SELECT * FROM FTSSampleProject WHERE Title MATCH {0} OR Description MATCH {0} OR Product MATCH {0} ORDER BY rank",McpDb.EscapeFtsQueryString(query,"OR"))
responseBuilder.Append(CultureInfo.InvariantCulture,$"## Response\n\nNo results found for: \"{query}\"\n\nIf you'd like to retry the search, try changing the query to increase the likelihood of a match.");
36
+
returnresponseBuilder.ToString();
37
+
}
38
+
39
+
responseBuilder.Append(CultureInfo.InvariantCulture,$"## Response\n\nResults found for: \"{query}\". Listing a document id and document title, followed by related product and a description of the sample:\n\n");
[McpServerTool(Name="fetch_duende_sample",Title="Fetch specific sample from Duende Code Samples",UseStructuredContent=true)]
50
+
[Description("Fetch a specific sample from the Duende Code Samples. The result contains a title, description, and the sample code in a list of files.")]
51
+
publicasyncTask<SampleProject>Fetch(
52
+
[Description("The document id.")]stringid)
53
+
{
54
+
varresult=awaitdb.FTSSampleProject
55
+
.FromSqlRaw("SELECT * FROM FTSSampleProject WHERE Id = {0} ORDER BY rank",id)
0 commit comments