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.annotation;
018
019import org.jspecify.annotations.NonNull;
020
021import java.lang.annotation.ElementType;
022import java.lang.annotation.Retention;
023import java.lang.annotation.RetentionPolicy;
024import java.lang.annotation.Target;
025
026/**
027 * Binds a parameter of an {@link McpPrompt} method as a published prompt
028 * argument.
029 * <p>
030 * Prompt arguments must be declared as {@code String} or
031 * {@code Optional<String>}. Requiredness is inferred from the declared type:
032 * {@code String} is required and {@code Optional<String>} is optional. A blank
033 * {@link #name()} uses the source-level Java parameter name. Explicit names
034 * provide a stable public contract across Java refactoring.
035 *
036 * @author <a href="https://www.revetkn.com">Mark Allen</a>
037 */
038@Target(ElementType.PARAMETER)
039@Retention(RetentionPolicy.RUNTIME)
040public @interface McpPromptArgument {
041        /**
042         * The published argument name.
043         *
044         * @return the argument name, or an empty string to use the Java parameter
045         * name
046         */
047        @NonNull
048        String name() default "";
049
050        /**
051         * The optional human-readable argument title.
052         *
053         * @return the title, or an empty string if none is configured
054         */
055        @NonNull
056        String title() default "";
057
058        /**
059         * The optional human-readable argument description.
060         *
061         * @return the description, or an empty string if none is configured
062         */
063        @NonNull
064        String description() default "";
065}