List authors over gRPCv1.0.0 · Protobuf Schema
Returns all Catalog authors through the book.v1 gRPC contract.
1. List All Catalog Authors for MCP Tools
McpTools calls book.v1.BookGrpcService/ListAuthors on Catalog API to expose available authors to AI assistant tools.
Payload details
- Request (
ListAuthorsRequest): Empty message. - Response (
ListAuthorsResponse):authors(repeated AuthorItemwithidandname).
Using this example
Returns StatusCode.OK with ListAuthorsResponse.Authors containing all non-deleted catalog authors.
using BookWorm.Catalog.Grpc.Services;using BookWorm.Chassis.Utilities;using BookWorm.Chassis.Utilities.Configurations;
// 1. DI registration in McpTools (src/Services/McpTools/BookWorm.McpTools/Grpc/Extensions.cs)builder.Services.AddGrpcServiceReference<BookGrpcService.BookGrpcServiceClient>( HttpUtilities .AsUrlBuilder() .WithScheme(builder.GetScheme()) .WithHost(Constants.Aspire.Services.Catalog) .Build(), HealthStatus.Degraded);
// 2. Typed gRPC client invocation (src/Services/McpTools/BookWorm.McpTools/Grpc/Services/Book/BookService.cs)var response = await client.ListAuthorsAsync( new(), deadline: DateTime.UtcNow.AddSeconds(10), cancellationToken: cancellationToken);1edition = "2023";
2
3package book.v1;
4
5service BookGrpcService {
6 rpc ListAuthors (ListAuthorsRequest) returns (ListAuthorsResponse);
7}
8
9message ListAuthorsRequest {}
10
11message ListAuthorsResponse {
12 repeated AuthorItem authors = 1;
13}
14
15message AuthorItem {
16 string id = 1;
17 string name = 2;
18}
19