001/* 002 * Copyright 2022-2026 Revetware LLC. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package com.soklet; 018 019import org.jspecify.annotations.NonNull; 020 021import javax.annotation.concurrent.ThreadSafe; 022 023/** 024 * Context supplied to {@link McpResponseMarshaler} during structured-content conversion. 025 * 026 * @author <a href="https://www.revetkn.com">Mark Allen</a> 027 */ 028@ThreadSafe 029public interface McpStructuredContentContext { 030 /** 031 * Provides the endpoint class that produced the structured content. 032 * 033 * @return the endpoint class 034 */ 035 @NonNull 036 Class<? extends McpEndpoint> getEndpointClass(); 037 038 /** 039 * Provides the tool name whose structured content is being marshaled. 040 * 041 * @return the tool name 042 */ 043 @NonNull 044 String getToolName(); 045 046 /** 047 * Provides the tool-call context for the current structured content marshaling operation. 048 * 049 * @return the tool-call context 050 */ 051 @NonNull 052 McpToolCallContext getToolCallContext(); 053 054 /** 055 * Provides the session context active for the tool call. 056 * 057 * @return the session context 058 */ 059 @NonNull 060 McpSessionContext getSessionContext(); 061}