001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.rest.server.mcp; 018 019import java.util.*; 020 021/** 022 * Revision-neutral prompt descriptor returned from {@code prompts/list}. 023 * 024 * <p> 025 * Supersedes the wire-level {@code Prompt} bean. 026 */ 027public class McpPromptSpec { 028 029 private String name; 030 private String description; 031 private List<McpPromptArgument> arguments; 032 033 /** 034 * The prompt name, used to route {@code prompts/get} requests. 035 * 036 * @return The name, or <jk>null</jk> if not set. 037 */ 038 public String getName() { 039 return name; 040 } 041 042 /** 043 * Sets the prompt name. 044 * 045 * @param value The new value. Can be <jk>null</jk> to unset the property. 046 * @return This object. 047 */ 048 public McpPromptSpec setName(String value) { 049 name = value; 050 return this; 051 } 052 053 /** 054 * The human-readable prompt description. 055 * 056 * @return The description, or <jk>null</jk> if not set. 057 */ 058 public String getDescription() { 059 return description; 060 } 061 062 /** 063 * Sets the prompt description. 064 * 065 * @param value The new value. Can be <jk>null</jk> to unset the property. 066 * @return This object. 067 */ 068 public McpPromptSpec setDescription(String value) { 069 description = value; 070 return this; 071 } 072 073 /** 074 * The prompt's declared arguments. 075 * 076 * @return The arguments, or <jk>null</jk> if not set. A <jk>null</jk> value is distinct from an 077 * empty list: it means the wire property is omitted entirely. 078 */ 079 public List<McpPromptArgument> getArguments() { 080 return arguments; 081 } 082 083 /** 084 * Sets the prompt's declared arguments. 085 * 086 * @param value The new value. Can be <jk>null</jk> to unset the property. 087 * @return This object. 088 */ 089 public McpPromptSpec setArguments(List<McpPromptArgument> value) { 090 arguments = value; 091 return this; 092 } 093}