Koskamo

Assert gRPC streaming message content and schema

Confirmation that streamed response messages match expected data structures, properties, or JSON schemas.

How it works

Read-onlySoftware development

The agent sends a gRPC request that returns a stream of messages. It then iterates through or filters the response messages using pm.response.messages. It asserts that specific properties exist in all messages, that messages include specific data subsets, or that the message data conforms to a defined JSON schema. This ensures the content and structure of the streamed data are correct.

Prompt

Paste this into an agent that has the servers below connected. Adjust the names and dates to your own.

Prompt for Assert gRPC streaming message content and schema
Send a gRPC request that returns a stream of messages. Validate the response by asserting that: 1. All messages contain a 'company' property with value 'XYZ'. 2. The messages match the following JSON schema: { "type": "object", "properties": { "username": { "type": "string", "pattern": "^[a-z0-9_-]{3,16}$" } } }. Use pm.response.messages.to assertions.

MCP servers it needs

Source

The vendor page this playbook is drawn from, and the passage that supports it.

You can assert that the received messages match the given JSON Schema: const schema = { type : " object " , properties : { username : { type : " string " , pattern : " ^[a-z0-9_-]{3,16}$ " } } };
Write tests for gRPC requests using JavaScript assertions in Postman | Postman Docs

Each playbook is drawn from the vendor page it cites and reviewed by Koskamo before it is published. Koskamo does not run these servers or your agent: check what each tool will do before you let it act on your accounts.