You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Explain what this resource contains and when it's useful.
90
+
* Detailed description of what this resource contains.
91
+
*
92
+
* DESCRIPTION BEST PRACTICES:
93
+
* - Explain what data is available
94
+
* - Mention update frequency or freshness
95
+
* - Note any access requirements or limitations
96
+
* - Include examples of use cases
97
+
* - Specify data format and structure
98
+
*
99
+
* EXAMPLES:
100
+
* "Real-time application logs from the last 24 hours. Updated continuously. Contains error messages, request traces, and performance metrics."
101
+
* "Complete user database with profiles, preferences, and activity history. Updated in real-time. Use for user analysis and support."
73
102
*/
74
-
public ?string $description = 'This resource provides [describe what it contains and its purpose]';
103
+
public ?string $description = 'A {{ className|lower }} resource that provides access to [describe your specific data source]. Replace this with details about what data is available, how often it updates, and when it should be used.';
75
104
76
105
/**
77
106
* MIME type of the resource content.
78
-
* Common types: text/plain, application/json, text/csv, image/png
107
+
* Helps clients understand how to process the data.
108
+
*
109
+
* COMMON MIME TYPES:
110
+
* - text/plain: Plain text files, logs
111
+
* - application/json: JSON data, API responses
112
+
* - text/csv: CSV files, exported data
113
+
* - application/xml: XML documents, configs
114
+
* - text/html: HTML content, reports
115
+
* - image/png, image/jpeg: Images, charts
116
+
* - application/pdf: PDF documents, reports
117
+
* - text/markdown: Markdown documentation
79
118
*/
80
119
public ?string $mimeType = 'text/plain';
81
120
@@ -127,11 +166,110 @@ class {{ className }} extends Resource
'message' => 'This is example content from {{ className }}',
251
+
'instructions' => 'Replace this with your actual resource data',
252
+
'suggestions' => [
253
+
'What data should this resource provide?',
254
+
'How often does it change?',
255
+
'What format is most useful for consumers?',
256
+
'Are there any access restrictions?',
257
+
'Should it include metadata or just raw data?',
258
+
],
259
+
],
260
+
'implementation_tips' => [
261
+
'Use try-catch for error handling',
262
+
'Consider caching for expensive operations',
263
+
'Validate access permissions if needed',
264
+
'Include helpful metadata in responses',
265
+
'Test with different scenarios and edge cases',
266
+
],
267
+
];
268
+
131
269
return [
132
270
'uri' => $this->uri,
133
-
'mimeType' => $this->mimeType,
134
-
'text' => "Replace this with actual content from your data source.\n\nThis could be:\n- File contents\n- Database query results\n- API responses\n- Generated reports\n- Or any other data",
0 commit comments